--- 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<noop>" 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<OSSP l2> builds its working configuration using a global environment
object and channels which are interconnected to form a channel tree.
@@ -165,7 +165,7 @@
B<param_value> ::= single-quoted, double-quoted
or unquoted text
-=head1 AVAILABLE OSSP L2 CHANNELS
+=head1 OSSP L2: AVAILABLE CHANNELS
B<OSSP l2> provides various channels. The following lists their
B<channel_name> prefixed with an 'C<o>' or a 'C<f>' indicating whether
@@ -347,7 +347,7 @@
use cannot use the I<target>=C<local> feature of B<OSSP l2>, 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<l2-spec> logging example where... FIXME...
+A very complex I<l2-spec> 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<OSSP fsl>:
+
+=over 4
+
+=item C<FSL_DEBUG>
+
+This variable overrides the default value (hard-coded in B<OSSP fsl>
+under built-time via C<--with-fsl-debug=>I<l2-spec>) under run-time.
+The value has to be a valid B<OSSP l2> channel tree specification. An
+empty value (either hard-coded or overridden) disables B<OSSP fsl>
+debugging via B<OSSP l2> (but still logs errors to F<stderr>). A value
+of "C<null>" instead disables debugging at all by discarding all
+messages.
+
+=back
+
=head1 FILES
=over 4
|