PageViews: 1,056 hits / 131 nets

Syslog Usage in DeleGate

Yutaka Sato
June 22, 2006

Basic functionality for syslog control were built-into DeleGate/9.2.3. The simplest way to enable syslog is:

It enables sending LOGFILE (the detailed logfile of the activity of DeleGate) and PROTOLOG (access log as common-logfile for HTTP or xferlog for FTP) to the local logger. You can select only PROTOLOG to be logged by specifying the "-vs" option as this: The syslog of DeleGate allows flexible control as follows: DeleGate itself will work as a syslog server in near future.

( excerpt from the reference manual )

DeleGate reference manual version 9.9 / SYSLOG
[CTX] [ALL]
SYSLOG parameter*   ==  SYSLOG=[syslogOpts,][syslogServ]
        syslogOpts  ==  syslogOpt[,syslogOpts]
         syslogOpt  ==  -vt | -vs | -vS | -vH | -fname
                    --  default: none
    This parameter specifies recording log data via the "syslog" service (RFC3164). The "facility.priority" pair of logged data of LOGFILE is "daemon.debug" for usual data and "daemon.err" for errors. (It will be divided into more detailed levels in the future.) The log data of PROTOLOG is sent with "daemon.notice". The facility name can be changed with a "-fname" option.

    Multiple SYSLOG parameters can be specified to send a log data to multiple different destinations each specified by a syslogServ. A syslogServ is a URL of a syslog server or a local file. The default syslogServ is the local logger to which log is sent via the standard "syslog()" function. For each destination, the log format or detailness can be specified by prefixing a list of syslogOpt as follows:

      -vt -- terse LOGFILE
      -vs -- without LOGFILE
      -vS -- without PROTOLOG
      -vH -- without the syslog header
      -fname  -- use the facility name instead of "daemon"

    Example:

      SYSLOG= -- to the local syslog
      SYSLOG=syslog://host -- to a remote syslog server
      SYSLOG=syslog://host:port  -- on a non-standard port
      SYSLOG=/dev/tty -- to the console
      SYSLOG=file:path -- to a local file
      SYSLOG=-vH,file:path -- without the syslog header
      SYSLOG=-fdaemon -- as the "daemon" facility (default)
      SYSLOG=-flocal1 -- as the "local1" facility

    The source port (and the address) of syslog UDP packets to a remote syslog server can be specified as SRCIF=":8514:syslog" (or SRCIF="xx.xx.xx.xx:8514:syslog") for example.
    Switching syslog servers based on each client and server of the application protocol is not (yet) supported.