OSSP CVS Repository

ossp - Check-in [2338]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2338
Date: 2002-Jul-24 15:11:37 (local)
2002-Jul-24 13:11:37 (UTC)
User:thl
Branch:
Comment: BNF; table of available channels; example
Tickets:
Inspections:
Files:
ossp-pkg/fsl/fsl.pod      1.6 -> 1.7     177 inserted, 49 deleted

ossp-pkg/fsl/fsl.pod 1.6 -> 1.7

--- fsl.pod      2002/07/24 07:57:04     1.6
+++ fsl.pod      2002/07/24 13:11:37     1.7
@@ -106,57 +106,185 @@
 existing program by just linking in the latest lib_l2. The main program
 remains unmodified.
 
-FIXME T_ID, channel_cons, try to remove the word "streams"
+B<tree>           ::= B<stream>
+                 
+B<stream>         ::= B<channel>
+                 | B<channel> '->' B<stream>
+                 | B<channel> '->' '{' B<streams> '}'
+
+B<streams>        ::= B<stream>
+                 | B<stream> ';' B<streams>
+
+B<channel>        ::= B<channel_level> '/'
+                   B<channel_level> ':' B<channel_cons>
+                 | B<channel_level> ':' B<channel_cons>
+                 | B<channel_cons>
+
+B<channel_level>  ::= B<level_name>
+                 | '(' B<channel_mask> ')'
+
+B<channel_mask>   ::= B<level_name>
+                 | B<level_name> '|' B<channel_mask>
+
+B<level_name>     ::= 'panic'
+                 | 'critical'
+                 | 'error'
+                 | 'warning'
+                 | 'notice'
+                 | 'info'
+                 | 'trace'
+                 | 'debug'
+
+B<channel_cons>   ::= B<channel_name> B<channel_params>
+
+B<channel_name>   ::= 'buffer'
+                 | 'fd'
+                 | 'file'
+                 | 'filter'
+                 | 'irc'
+                 | 'noop'
+                 | 'null'
+                 | 'pipe'
+                 | 'prefix'
+                 | 'smtp' 
+                 | 'socket'
+                 | 'syslog'
+                 | ...
+
+B<channel_params> ::= I<empty>
+                 | '(' ')'
+                 | '(' B<channel_plist> ')'
 
-B<tree>          ::= B<stream>
-
-B<stream>        ::=
-                | B<channel>
-                | B<channel> => stream
-                | B<channel> => '{' streams '}'
-
-B<streams>       ::=
-                | stream
-                | stream ';' streams
-
-B<channel>       ::=
-                | B<channel_level> '/' B<channel_level> ':' B<channel_cons>
-                | B<channel_level> ':' B<channel_cons>
-                | B<channel_cons>
-
-B<channel_level> ::=
-                | T_ID
-                | '(' B<channel_mask> ')'
-
-B<channel_mask>  ::=
-                | T_ID
-                | T_ID '|' B<channel_mask>
-
-B<channel_params>::= I<empty>
-                | '(' ')'
-                | '(' B<channel_plist> ')'
-
-B<channel_plist> ::=
-                | B<channel_param>
-                | B<channel_param> ',' B<channel_plist>
+B<channel_plist>  ::= B<channel_param>
+                 | B<channel_param> ',' B<channel_plist>
         
-B<channel_param> ::=
-                | paramter '=' value
- 
-
-Here is a table of available channels that lists their names and
-parameters including the type of each parameter.
-
-buffer (INT size, INT interval, INT levelflush);
-fd     (INT filedescriptor);
-file   (STR path, INT append, INT perm);
-filter (STR regex, INT negate, INT nocase);
-irc    (STR progname, STR localhost, STR localuser, STR nickname, STR username, STR realname, STR channel, INT join, STR host, STR port, INT timeout);
-pipe   (STR execmode, STR runtime, STR path);
-prefix (STR prefix, STR timezone);
-smtp   (STR progname, STR localhost, STR localuser, STR from, STR rcpt, STR subject, STR host, STR port, INT timeout);
-socket (STR proto, STR host, STR port, INT timeout);
-syslog (STR target, STR remotehost, INT remoteport, STR localhost, STR facility, STR ident, INT logpid);
+B<channel_param>  ::= B<param_name> '=' B<param_value>
+
+B<param_name>     ::= m/[a-zA-Z][a-zA-Z0-9_-]*/
+
+B<param_value>    ::= single-quoted, double-quoted
+                   or unquoted text
+
+Here is a table of available channels that lists their B<channel_name> and
+B<param_names> including the type of each parameter.
+
+FIXME mandatories, defaults, output vs. filterchannels
+
+    buffer (INT size,
+            INT interval,
+            INT levelflush);
+
+    fd     (INT filedescriptor);
+
+    file   (STR path,
+            INT append,
+            INT perm);
+
+    filter (STR regex,
+            INT negate,
+            INT nocase);
+
+    irc    (STR progname,
+            STR localhost,
+            STR localuser,
+            STR nickname,
+            STR username,
+            STR realname,
+            STR channel,
+            INT join,
+            STR host,
+            STR port,
+            INT timeout);
+
+    noop   ()
+
+    null   ()
+
+    pipe   (STR execmode,
+            STR runtime,
+            STR path);
+
+    prefix (STR prefix,
+            STR timezone);
+
+    smtp   (STR progname,
+            STR localhost,
+            STR localuser,
+            STR from,
+            STR rcpt,
+            STR subject,
+            STR host,
+            STR port,
+            INT timeout);
+
+    socket (STR proto,
+            STR host,
+            STR port,
+            INT timeout);
+
+    syslog (STR target,
+            STR remotehost,
+            INT remoteport,
+            STR localhost,
+            STR facility,
+            STR ident,
+            INT logpid);
+
+
+    EXAMPLE for a very simple l2spec writing to STDERR (FD#2)
+
+    fd(filedescriptor=2)
+
+    EXAMPLE for a simple l2spec writing to a file
+
+    file(path="/var/log/file")
+
+    EXAMPLE for a very complex l2spec
+
+    noop
+    -> {
+        (info): filter(
+            regex="foo"
+        ) 
+        -> syslog(
+            remotehost="localhost"
+        );
+        info: prefix(
+        ) 
+        -> {
+            debug/error: buffer(
+                size=1024
+            ) 
+            -> file(
+                path="a"
+            );
+            (trace|debug)/(trace): buffer(
+                size=65536
+            ) -> 
+            file(
+                path="b"
+            )
+        };
+        prefix() -> {
+            warning: filter(
+                negate=1, 
+                regex="foo"
+            ) 
+            -> irc(
+                host=irc.dev.de.cw.net
+            );
+            error: filter(
+                nocase=1, 
+                regex="foo"
+            ) 
+            -> smtp(
+                host=sv1.dev.de.cw.net
+            );
+            panic: smtp(
+                host=sv1.dev.de.cw.net
+            )
+        }
+    };
 
 =head1 EXAMPLE
 

CVSTrac 2.0.1