Kiwi Logger is distributed with KLOG.DLL. This DLL provides applications the functions required to send syslog messages. Software developers are encouraged to use this DLL to easily add syslog support directly into their products. The DLL will need to be distributed with the application. Alternatively, you can use the import library to remove the distribution requirement.
BOOL WINAPI KLogInitialise();
Sets all default values, and erases anything set by other arguments. It MUST be run at least once, and before any other KLOG function.
BOOL WINAPI KLogSetPortByService(char *);
Sets the destination port for syslog messages using a service name, the default is "syslog", ie port 514. KLOG will create a new connection to the host when the port is set or changed.
BOOL WINAPI KLogSetPortByNum(int);
Sets the destination port for syslog messages using a number, like u. KLOG will create a new connection to the host when the port is set or changed.
BOOL WINAPI KLogSetHostAddress(char *);
Sets the destination hostname or IP address, like h. KLOG will create a new connection to the host when the hostname is set or changed.
BOOL WINAPI KLogSetMessagePriority(int);
Sets the message priority, like p. Setting the priority as a number will override settings from facility numbers, which in turn override settings from facility names.
BOOL WINAPI KLogSetMessageLevelNum(int);
Sets the message level, like l.
BOOL WINAPI KLogSetMessageFacilityNum(int);
Sets the message facility, like f.
BOOL WINAPI KLogSetMessageLevelName(char *);
Sets the message level name, like L.
BOOL WINAPI KLogSetMessageFacilityName(char *);
Sets the message facility name, like F.
BOOL WINAPI KLogSetProcessName(int, char *);
Sets whether or not to use the RFC format (1 or 0). If 1, then the second argument string is the process name, like r.
BOOL WINAPI KLogUseTCP(int);
Sets whether to send messages in TCP connections (1) or UDP (0), like t. KLOG will create a new connection to the host when this is set or changed.
BOOL WINAPI KLogUseSilentErrors(int);
Sets the silent error option (0 or 1), like s. Errors are written to klogerr.log in the current directory.
BOOL WINAPI KLogSetMessage(char *);
Sets the syslog message string.
BOOL WINAPI KLogSendMessage(int *);
Checks that the message parameters previously set are valid, then attempts to send the message. In the return parameter, it returns 0 on success, or a return code on failure. Use KlogReturnError() to find what happened.
BOOL WINAPI KLogReturnError(char *, int);
Returns a string message of the current error. The arguments needed are a local string to write the error, and the size of this string.
BOOL WINAPI KLogGetUsageHelp(char *, int);
Returns generic KLOG usage. Requires a local string to return the details in, and its length.
BOOL WINAPI KLogGetUsageExample(char *, int);
Returns a generic KLOG usage example. Requires a local string to return the details in, and its length.
BOOL WINAPI KLogGetSoftwareInfo(char *, int);
Returns copyright details. Requires a local string to return the details in, and its length.
BOOL WINAPI KLogGetPriorityNames(char *, int);
Returns KLOG priority facilities and levels. Requires a local string to return the details in, and its length.