# Define an error log at the top of the file to maximize the configuration errors recorded..
~ --stderr=/opt2/log/error.demo, mode=666,level=debug

# ================================================================================
# As a rule, when the tilde ('~') is the first (active) character in a line, 2 hashtags must be used for a comment.
# A 'tilde-line' with no hashtag or only one hashtag is a 'soft-comment' -- and will be interpreted as configuration.
# ================================================================================

# deconflict with executing copy of syslog processor.
~ --ApplicationMode

# Journal input is off by default.  It must be enabled before it can be used.
## ~ --enable journal

# Disable the mark messages to keep our output file 'clean'. Set default output-file ownership and permission masks.
~ --defaults markinterval = 0, fileowner=1000, filegroup=1000, filemode=640

# If you choose to move Syslogd2's configuration directory to another location, uncomment and modify the following line accordingly:
## ~ --defaults  configdir = /etc/syslog.d

# Set unrealistically low default values for all threadpools (for demonstration purposes only).
# These settings will essentially provide single-threaded performance.
~ --defaults readers=3, workers=3, workerlines=l0, housekeeping=4, outputworkers=3, outputlines=10

# Centrally define some threadpools (with all their parameters. Worker-type and output-type definitions will produce errors until a binary supporting those features is used.
# 'journal' threadpool uses a separate threadpool-id series from socket threadpools so both can be defined as threadpool 0 (zero) without conflict.
# 'journal' threadpool will use worker threadpool 0. (All input-type threadpools default to 'queueid = 0'.)
# Socket readers (including command-input connection) will use worker threadpool 1

#~ --threadmaps journal, r=1, id=0, q=0;      worker, id=0, w=1, l=10;      output, id=0, w=1, l=10
#~ --threadmaps input, id=0, r=1, q=0;  
#~ --threadmaps tailfile, id=0, r=1, q=0
#~ --threadmaps input, id=1, r=1, q=1;   worker, id=1, w=1, l=10;      output, id=1, w=1, l=10
#~ --threadmaps input, id=2, r=1, q=2;   worker, id=2, w=1, l=10;      output, id=2, w=1, l=10
#~ --threadmaps input, id=3, r=1, q=2;   worker, id=3, w=1, l=10;      output, id=3, w=1, l=10
#~ --threadmaps input, id=4, r=1, q=2;   worker, id=4, w=1, l=10;      output, id=4, w=1, l=10


# Define a journal input (on standby until enabled)
# Force all traffic to 'extra31' (and our output file).
# To see the full list of available fields for journal input, uncomment the line below (and comment the one that follows it)
## ~ --journal, id=4, r=4, allfields, facility=extra31,ignore=facility, append
~ --journal, id=4, r=4, q=3, facility=extra31,ignore=facility, append


# Define a set of fields to include if 'allfields' is not set by '--journal' or to prioritize if it is.
# ~ --journalfield  TRANSPORT = src
# ~ --journalfield  _UID = euid
# ~ --journalfield  _GID = egid
# ~ --journalfield  _AUDIT_LOGIN_UID = uid
# ~ --journalfield  _AUDIT_LOGIN_GID = gid

# Define a Linux datagram socket (for demo) and a Linux stream socket for the command-tool to connect to. (The stream socket can also process traffic.)
~ --input /dev/logStream, stream, command, id=2
~ --input /dev/logDemo, id=2

# Define a UDP and a TCP IP input for manual traffic input.
~ --input 127.0.0.1, port=1028, id=1 ## send udp data to the file demolog.2
~ --input 127.0.0.1, port=1028, stream, id=1 ## send tcp data to the file demolog.3

# Define a named-pipe input for manual traffic input.
~ --pipe /dev/pipeDemo, id=0

# Define a couple of text-file inputs
~ --tailfile /var/log/mysql/mysql.log, append
~ --tailfile /var/log/mysql/error.log, append

# Demonstrate various 'include' syntax options
# By using the '--output' option 'id=', the --include command changes the default threadpool for all outputs in that file.
# Any output specifications added to the file 'Demo1Include1.inc' will default to output-threadpool 15. Likewise any input specifications will default to input-threadpool 15.
# Any output specifications added to the file 'Demo1Include2.inc' will default to output-threadpool 15. Likewise any input specifications will default to input-threadpool 16.
~ --include Demo1Include1.inc --outputparms = id=15 --inputparms id = 15   ## Syslogd2 expects to find this file in <configdir> ('/etc/syslog.d' by default unless changed above)
~ --include Demo1Include2.inc --outputparms id=16 --inputparms id = 16   ## Syslogd2 expects to find this file in <configdir> ('/etc/syslog.d' by default unless changed above)

# In addition to specific files, you can specify a directory for include files. All *.conf files in that directory will be included as config files.
## ~ --include /opt2/log/conf.d --outputparms id=17  --inputparms id=17

# If no include filename or directory name is given, all '*.conf' files in <ConfigDir> will be used as include files.
## ~ --include --outputparms id=18 --inputparms id 18


# Define some output files with some different output formats.
extra31.*  -  /opt2/log/demolog1.demo, id=4, format=rfc
extra0.*  -  /opt2/log/demolog2.demo, uid=0, gid=0, mode=664, format = clock
extra1.*  -  /opt2/log/demolog3.demo, format=noheader
extra2.*  -  /opt2/log/demolog4.demo, format=nofacpri;noheader
kern.*  -  /opt2/log/kernel.demo, uid=1001, gid=1001, mode=464, format=rfc;nofacpri

# this selector-syntax specifies an inclusive range of facilities and an inclusive range of priorities (extra16.warn through extra16.debug).
extra0-extra15.*;extra16.>=warn  -  /opt2/log/extraslog.demo, format
