# /*********************************************************************************************
#     Syslogd2 is a syslog data-collection application specifically targeting network & host management needs.
#     It runs as a replacement for (or as a supplement to) a host's existing syslog service-daemon.
#     Syslogd2 is designed to be portable across operating systems.
#     ******************************************************************************************
#     Copyright (C) 2002 - present by Ed Freesmeyer <ed@freesmeyer.com>
#     Released under Aferro GPLv3
#     https://sourceforge.net/projects/syslogd2/
# 
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU Affero General Public License as
#     published by the Free Software Foundation, either version 3 of the
#     License, or (at your option) any later version.
# 
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU Affero General Public License for more details.
# 
#     You should have received a copy of the GNU Affero General Public License
#     along with this program.  If not, see <https://www.gnu.org/licenses/>.
# *********************************************************************************************/


#-----------------------  A note from Ed Freesmeyer to whomever may use this code.  ----------------------
# This is the configuration file for testFilter.
#
# Its primary purpose for existing is to act as a central (and persistant) place for users to configure
# scenarios and operating conditions for the testFilter applet to emulate when testing (and developing if I'm honest)
# various filter capabilities.
# 
# This file defaults to '/etc/syslog.d/testFilter.conf'.
# It can be specified at a new location with the '--configfile=' option to testFilter.
#
# This file may (at times) seem a bit awkward. This is partly because much of the code used in testFilter is
# literally the same code used in Syslogd2 to read files, set up input parameters, parse messages, apply filters, etc.
# 
# Meanwhile, much of the un-needed Syslogd2 code has been 'cut out' as have all optional compiler-symbols.
# This is both to reduce the size and complexity of testFilter and to minimize the number of issues that future Syslogd2
# upgrades may have on testFilter due to code or data-structure modifications.
#
# Because of the extremely close ties between Syslogd2 and testFilter and the HUGE amount of code they share,
# the syntax of this file will look very much like that of Syslogd2's configuration file with the following omissions (the similarities are intentional):
#
# 	-- There are no output-line definitions. None of Syslogd2's output-processing code has been moved into testFilter.
#  -- The 'ThreadMaps' option is not supported.
#  -- testFilter simulates only a single instance of a single filter on a given set of syslog event msgs and processed conditions.
# 		It is intended as a test-and-debug tool to validate filter syntax and to show the results of whatever
# 		experimental filter options the user may want to play with.
# 	-- The only input type supported by the parser is 'socket' (either Linux or IP), (stream or datagram).
# 		-- in practice, no socket input is actually supported. All actual input is via pre-configured input files.
# 		-- The '--input' options are only there to syntactically support those options that affect filtering ('facility', 'priority', 'hostname',
#		-- 	'filter', 'ignore').
#
# This file (like that of Syslogd2) treats all non-output-lines (of which there are now none) as if they are command-line options.
# 		Therefore, the same 'line-recognition-rules' and 'soft-comment' policies apply (it's easier than attempting to 'patch' the Syslog parsing code).
#--------------------------------------------------------------------------------------------------------

## --input lines still follow the 'parsing-rules' of Syslogd2.

#	// if CAP_CACHE is not declared, SetResolvedCache is moot.
#	// SetResolvedDNS means this address is/was resolved via DNS and DNS is enabled. -- it is moot without SetInet

# Cache & DNS hostname lookups are not supported. All hostnames are assumed to have already been resolved prior to the point that testFilter emulation begins..

# The 'defaults' line will still parse the same (except programmable-interrupt settings) entries as in Syslogd2, but the entries listed below are the only ones that
# 		will have any effects within the 'testFilter' code. All other entries are ignored.
# defaults = kernelfacility = , userfacility = , syslogfacility = , ConfigDir, hostname, domainname
defaults hostname = let, domainname=freedom.ring


# For purposes of testFilter, the name (or address) that would normally be used to identify an input socket, will be ignored.
# A filter-filename must be specified however if a filter is to be used.
# As in Syslogd2, the filter-file-name is either an absolute filename or is relative to 'ConfigDir'. (Hence the ability to set 'ConfigDir') in '--defaults'.
# This filter filename will over-ride any specified on the command-line when using this configuration file (and option-set).
# As in Syslogd2, the filter-filename may be absolute or relative. If Relative, it is relative to 'ConfigDir'.
# Input options that could affect the message's 'hostname' field (and their corresponding '--default' settings) are supported because of the filter's abiltiy to search/modify hostnames.
# Because 'testFilter' also supports 'noheader', 'nohost', and noforceprintable, and uses the same time-field identification code as Syslogd2, it can also be used to test
# testfile input and/or unknown time-formats for compatability with Syslogd2.
input = /tmp/junker.socket, port=abc, hostname=sallyhost, facility = extra4, priority = err, filter=filters/command.input.filter, ignore=facility;priority;hostname, noforceprintable # , noheader, nohost
#input = /tmp/junker.socket, port=abc, hostname=sallyhost, facility = extra4, priority = err, filter=filters/defLinux.input.filter, ignore=facility;priority;hostname, noforceprintable # , noheader, nohost



