Index: ossp-pkg/fsl/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/fsl/ChangeLog,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/fsl/ChangeLog,v' 2>/dev/null --- ChangeLog 2002/07/30 18:51:51 1.1 +++ ChangeLog 2002/08/01 10:18:06 1.2 @@ -1,4 +1,17 @@ + __ _ + / _|___| | + | |_/ __| | + | _\__ \ | + |_| |___/_| + + OSSP fsl - Faking/Flexible Syslog Library ChangeLog ========= + Changes between 0.1.* and 1.0.0 (09-Jul-2002 to 01-Aug-2002) + + *) Switched to OSSP l2 for message logging + *) Switched to OSSP cfg and OSSP pcre for configuration parsing + *) Based on fakesyslog.c from OpenPKG 1.0 + Index: ossp-pkg/fsl/INSTALL RCS File: /v/ossp/cvs/ossp-pkg/fsl/INSTALL,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/fsl/INSTALL,v' 2>/dev/null --- INSTALL 2002/07/27 18:13:51 1.1 +++ INSTALL 2002/08/01 10:18:06 1.2 @@ -11,7 +11,9 @@ To install OSSP fsl into /path/to/fsl/ perform the following steps in your shell: - $ ./configure --prefix=/path/to/fsl + $ ./configure --prefix=/path/to/fsl \ + [--with-fsl-cfgdir=/path/to/fsl/cfg/dir] \ + [--with-fsl-debug='...'] $ make $ make install Index: ossp-pkg/fsl/README RCS File: /v/ossp/cvs/ossp-pkg/fsl/README,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/fsl/README,v' 2>/dev/null --- README 2002/08/01 09:33:24 1.16 +++ README 2002/08/01 10:18:06 1.17 @@ -47,8 +47,9 @@ HOME AND DOCUMENTATION - The documentation and latest release can be found on + The documentation and latest sources can be found on o http://www.ossp.org/pkg/lib/fsl/ + o http://cvs.ossp.org/pkg/lib/fsl/ o ftp://ftp.ossp.org/pkg/lib/fsl/ Index: ossp-pkg/fsl/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/fsl/configure.ac,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/fsl/configure.ac,v' 2>/dev/null --- configure.ac 2002/08/01 09:36:53 1.11 +++ configure.ac 2002/08/01 10:18:06 1.12 @@ -34,6 +34,7 @@ dnl # announce our version V=`./shtool version -lc -dlong fsl_version.c` ./shtool echo -e "Configuring %BOSSP fsl%b (Faking/Flexible Syslog Library), Version %B${V}%b" +echo "Copyright (c) 2002 Ralf S. Engelschall " echo "Copyright (c) 2002 The OSSP Project " echo "Copyright (c) 2002 Cable & Wireless Deutschland " @@ -94,41 +95,7 @@ AC_SUBST(LIB_DEPS) AC_CONFIG_SUBDIRS([$SUBDIR_L2 $SUBDIR_CFG $SUBDIR_PCRE]) -AC_MSG_CHECKING(for platform) -PLATFORM=`sh ./config.guess` -if test ".$PLATFORM" != .; then - PLATFORM=`sh ./config.sub $PLATFORM` -fi -AC_MSG_RESULT([$PLATFORM]) -case $PLATFORM in - *-*-solaris2.[[6-9]]* ) - AC_DEFINE(HAVE_VSYSLOG_USVALIST, 1, [vsyslog(3) uses __va_list]) - ;; - *-*-osf* ) - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" - ;; -esac - -AC_MSG_CHECKING(for configuration directory) -AC_ARG_WITH(cfgdir,dnl -[ --with-cfgdir=PATH set configuration directory (default=PREFIX/etc/fsl)], -[ fsl_cfgdir=$withval ], -[ fsl_cfgdir="${prefix}/etc/fsl" ] -)dnl -AC_DEFINE_UNQUOTED(FSL_CFGDIR, "$fsl_cfgdir", [Define configuration directory]) -FSL_CFGDIR="$fsl_cfgdir" -AC_SUBST(FSL_CFGDIR) -AC_MSG_RESULT([$fsl_cfgdir]) - -AC_MSG_CHECKING(for debugging using a l2spec) -AC_ARG_WITH(debug,dnl -[ --with-debug=L2SPEC set debugging using a l2spec (default="")], -[ fsl_debug=$withval ], -[ fsl_debug="null()" ] -)dnl -AC_DEFINE_UNQUOTED(FSL_DEBUG, "$fsl_debug", [Define debugging using a l2spec]) -AC_MSG_RESULT([$fsl_debug]) - +dnl # output generation AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([Makefile fsl-config]) AC_CONFIG_COMMANDS([adjustment], [chmod a+x fsl-config]) Index: ossp-pkg/fsl/fsl.ac RCS File: /v/ossp/cvs/ossp-pkg/fsl/fsl.ac,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/fsl/fsl.ac,v' 2>/dev/null --- fsl.ac 2002/07/27 15:37:21 1.2 +++ fsl.ac 2002/08/01 10:18:06 1.3 @@ -28,11 +28,52 @@ dnl ## fsl.ac: OSSP fsl Autoconf checks dnl ## -dnl # Check for anything OSSP SA wants to know +dnl # Check for anything OSSP fsl wants to know dnl # configure.in: dnl # FSL_CHECK_ALL AC_DEFUN(FSL_CHECK_ALL,[ - AC_CHECK_HEADERS(syslog.h) + +dnl # header checking +AC_CHECK_HEADERS(syslog.h) + +dnl # platform specific hacks +AC_MSG_CHECKING(for platform) +PLATFORM=`sh ./config.guess` +if test ".$PLATFORM" != .; then + PLATFORM=`sh ./config.sub $PLATFORM` +fi +AC_MSG_RESULT([$PLATFORM]) +case $PLATFORM in + *-*-solaris2.[[6-9]]* ) + AC_DEFINE(HAVE_VSYSLOG_USVALIST, 1, [vsyslog(3) uses __va_list]) + ;; + *-*-osf* ) + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" + ;; +esac + +dnl # built-time configuration parameter --with-cfgdir +AC_MSG_CHECKING(for configuration directory) +AC_ARG_WITH(fsl-cfgdir,dnl +[ --with-fsl-cfgdir=PATH set configuration directory (default=PREFIX/etc/fsl)], +[ fsl_cfgdir=$withval ], +[ fsl_cfgdir="${prefix}/etc/fsl" ] +)dnl +AC_DEFINE_UNQUOTED(FSL_CFGDIR, "$fsl_cfgdir", [Define for OSSP fsl configuration directory]) +FSL_CFGDIR="$fsl_cfgdir" +AC_SUBST(FSL_CFGDIR) +AC_MSG_RESULT([$fsl_cfgdir]) + +dnl # built-time configuration parameter --with-debug +AC_MSG_CHECKING(for debugging using a l2spec) +AC_ARG_WITH(fsl-debug,dnl +[ --with-fsl-debug=L2SPEC set internal debugging (default="")], +[ fsl_debug=$withval ], +[ fsl_debug="" ] +)dnl +AC_DEFINE_UNQUOTED(FSL_DEBUG, "$fsl_debug", [Define for OSSP fsl debugging]) +AC_MSG_RESULT([$fsl_debug]) + ]) Index: ossp-pkg/fsl/fsl.pod RCS File: /v/ossp/cvs/ossp-pkg/fsl/fsl.pod,v rcsdiff -q -kk '-r1.21' '-r1.22' -u '/v/ossp/cvs/ossp-pkg/fsl/fsl.pod,v' 2>/dev/null --- fsl.pod 2002/08/01 09:48:55 1.21 +++ fsl.pod 2002/08/01 10:18:06 1.22 @@ -78,7 +78,7 @@ top "C" channel to form a single channel tree. Further calls to syslog(3) will then inject log messages into this channel tree. -=head1 OSSP L2 CHANNEL TREE SPECIFICATION +=head1 OSSP L2: CHANNEL TREE SPECIFICATION B builds its working configuration using a global environment object and channels which are interconnected to form a channel tree. @@ -165,7 +165,7 @@ B ::= single-quoted, double-quoted or unquoted text -=head1 AVAILABLE OSSP L2 CHANNELS +=head1 OSSP L2: AVAILABLE CHANNELS B provides various channels. The following lists their B prefixed with an 'C' or a 'C' indicating whether @@ -347,7 +347,7 @@ use cannot use the I=C feature of B, because it would lead to a endless run-time loop! Be careful here, please. -=head1 EXAMPLES +=head1 OSSP L2: EXAMPLES =head2 Example 1: simple stderr logging @@ -368,7 +368,8 @@ =head2 Example 3: complex logging -A very complex I logging example where... FIXME... +A very complex I logging example follows. +Figuring out the details is left as an exercise to the reader ;) noop -> { @@ -422,6 +423,80 @@ } }; +=head1 EXAMPLE + + # map syslog(3) API priorities to OSSP l2 levels + # Notes: - syslog(3) has no corresponding priority for OSSP l2 "trace" + # - OSSP l2 has no corresponding level for syslog(3) emerg + map emerg panic; + map alert panic; + map crit critical; + map err error; + map warning warning; + map notice notice; + map info info; + map debug debug; + + # equivalent of the usual INN syslog.conf(5) entries: + # news.crit @l_prefix@/var/inn/log/news.crit + # news.err @l_prefix@/var/inn/log/news.err + # news.notice @l_prefix@/var/inn/log/news.notice + ident (.+)/news q{ + prefix( + prefix="%b %d %H:%M:%S %N $1[%P]: ", + timezone=local + ) + -> { + critical: file( + path="@l_prefix@/var/inn/log/news.crit", + append=1, + perm=0644 + ); + error: file( + path="@l_prefix@/var/inn/log/news.err", + append=1, + perm=0644 + ); + notice: file( + path="@l_prefix@/var/inn/log/news.notice", + append=1, + perm=0644 + ) + } + } + + # default logging + default (.+)/.+ q{ + debug: + prefix( + prefix="%b %d %H:%M:%S <%L> $1[%P]: ", + timezone=local + ) -> + file( + path="@l_prefix@/var/fsl/default.log", + append=1, + perm=0644 + ) + }; + +=head1 ENVIRONMENT + +The following environment variables affect the execution of B: + +=over 4 + +=item C + +This variable overrides the default value (hard-coded in B +under built-time via C<--with-fsl-debug=>I) under run-time. +The value has to be a valid B channel tree specification. An +empty value (either hard-coded or overridden) disables B +debugging via B (but still logs errors to F). A value +of "C" instead disables debugging at all by discarding all +messages. + +=back + =head1 FILES =over 4 Index: ossp-pkg/fsl/fsl.sample.cfg RCS File: /v/ossp/cvs/ossp-pkg/fsl/Attic/fsl.sample.cfg,v co -q -kk -p'1.3' '/v/ossp/cvs/ossp-pkg/fsl/Attic/fsl.sample.cfg,v' | diff -u - /dev/null -L'ossp-pkg/fsl/fsl.sample.cfg' 2>/dev/null --- ossp-pkg/fsl/fsl.sample.cfg +++ /dev/null 2024-05-22 01:15:32.000000000 +0200 @@ -1,19 +0,0 @@ -# -# SAMPLE FSL CONFIGURATION FILE -# - -ident (.*)a(.*)/(.*)p q{ - debug: prefix(prefix="%b %d %H:%M:%S <%L> $1[%P]: ", timezone=local) - -> file(path="sendmail.debug.log", append=0, perm=0644) -}; - -ident mail/.* q{ - error: prefix(prefix="%b %d %H:%M:%S <%L> $1[%P]: ", timezone=local) - -> file(path="mail.error.log", append=0, perm=0644) -}; - -ident news/.* q{ - warning: prefix(prefix="%b %d %H:%M:%S <%L> $1[%P]: ", timezone=local) - -> file(path="news.warning.log", append=0, perm=0644) -}; -