Usage
Previous  Top  Next

This section describes the command line options for the console-mode and Windows executable. All other products in the suite share the functionality.

From the command line, run klog.exe (or klogwin.exe) with the command line switches required for your message. To display copyright details use klog -c. For syntax help, use klog -?. For facility and level names, use klog –d.

The following command line switches are recognised by Kiwi Logger:

Flag
Description
-u <port>
Destination port on the Syslog Daemon host
-h <host>
Destination host address of the Syslog Daemon
-p <priority>
Message priority (0 to 191)
-f <facility no>
Message facility number (0 to 23)
-l <level no>
Message level number (0 to 7)
-F <facility name>
Message facility name (kernel to local7)
-L <level name>
Message level name (emergency to debug)
-r <process name>
Sends messages in RFC3164 format
-t
Use TCP sockets instead of UDP
-w
Repeat the message every second until a key press
-s
Silently log error messages
-m <message>
The message text
-i
Use standard input for message text (stdin)


All command line switches are optional. Message text must be specified by either the -m or -i switch.

The -i switch allows the input to come from standard input. For example tail -f myfile.txt | Klog -i

The default destination syslog host is localhost.

By default, syslog messages are sent with the priority user.info. You may change this priority by
·Using the -F and -L flags to modify the facility and level names,  
·Using the -f and -l flags to modify the facility and level numbers, or  
·Using the -p flag to set the priority using an absolute natural number, up to 191.  

Using a –p option will override –f and –l options, which in turn override –F and –L options.

Messages can be sent with a RFC compliant header field. The RFC header is inserted between the message priority value and the message text. The header contains:
·The current date and time,  
·The local machine's hostname, and  
·The name of the process sending the syslog message (cannot have white space).  

Messages sent over TCP/IP will be appended with a Carriage Return character.

As per RFC3164, the total syslog message length (text plus headers) must not exceed 1024 bytes in length.

Error messages are written on screen. Alternatively, the –s argument will write all error messages to klogerr.log in the current working directory. If it fails to write to this file, it will not report any errors.