OSSP CVS Repository

ossp - History for /ossp-pkg/l2/l2.h.in
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Directory]  [Omit Milestones

DateVersion Description
2005-Oct-03 10:08    1.34    Check-in [5217]: Adjust copyright messages for new year 2005. By rse. (diff)
2005-Jan-24 16:03    1.33    Check-in [4979]: Adjust copyright messages for new year 2005. By rse. (diff)
2003-Nov-10 16:12    1.32    Check-in [3669]: remove non-generic code (possibly leaked from lmtp2nntp) as it violates prefix-safety and collides with Darwin log2() math function By thl. (diff)
2003-Jan-06 12:41    1.31    Check-in [3065]: - remove trailing whitespaces - adjust copyright messages - consistently use "OSSP l2" - consistently talk about "Flexible Logging" - use standard OSSP ASCII-art By rse. (diff)
2002-Jul-30 21:08    1.30    Check-in [2437]: polish for release By rse. (diff)
2002-Jul-17 13:22    1.29    Check-in [2296]: added errno formatter from lmtp2nntp By thl. (diff)
2002-Jan-30 16:42    1.28    Check-in [1719]: make logX utility macros public By rse. (diff)
2002-Jan-02 18:07    1.27    Check-in [1492]: bump copyright year By rse. (diff)
2001-Dec-22 23:18    1.26    Check-in [1450]: Fix l2_spec_error function and remove again the not really needed l2_env_verrorinfo function. By rse. (diff)
2001-Dec-14 13:39    1.25    Check-in [1426]: provide l2_env_verrorinfo() and a new L2_ERR_SYN By rse. (diff)
2001-Nov-30 10:44    1.24    Check-in [1389]: Allow a channel tree specification to be a printf-style string to make the API more powerful and to remove the burden from the application to pre-format the specification in an own buffer. By rse. (diff)
2001-Nov-16 20:53    1.23    Check-in [1358]: Whoops, corrected function prototype. By ms. (diff)
2001-Nov-16 20:40    1.22    Check-in [1354]: Mostly finished phase in of timer code to l2_env. Buffer needs work. By ms. (diff)
2001-Nov-07 17:17    1.21    Check-in [1265]: HEADS UP, guys:

Here comes the first cut for the long-awaited channel tree specification parser and channel tree builder. This certainly makes L2 finally THE killer library in the logging field. Woohooo... and the crowd goes wild!

It allows one to build an arbitrary complex logging channel tree out of a single textual specification. An example follows:

    noop -> {
        prefix(prefix="[%d-%m-%Y/%H:%M:%S] %L test[%P]: ", timezone="local")
        -> filter(regex="hecking", negate="0")
           -> buffer(size="800")
              -> file(path="l2_test.log",append="1",perm="420");
        error: syslog(ident="L2-Test", facility="user",
                      remotehost="en1", logpid="1", target="remote");
        panic: smtp(rcpt="rse@engelschall.com", host="en1", port="25"
    }

This allows one to log nice timestamp-prefixed messages containing the word "hecking" to a buffered file. Additionally if the message has a level higher or equal to "error" it also logs it remotely via UDP to the syslogd on en1. And additionally if the message is a panic message, it is also sent out as an Email via SMTP to the MTA on en1.

Ever thought a C library has to be dull and simple? ;)

PS: This stuff certainly needs more polishing and cleanup and also a few things I'll enhance in the future (for instance to remove the restriction that parameter values have to be in quotation marks, etc.). By rse. (diff)

2001-Nov-07 14:05    1.20    Check-in [1260]: Hell, I've seldom seen that it is needed to prepare and adjust such a lot of subtle details of existing code in order to make a new feature implementable in a straight-forward way. Anyway, here comes one more preparation change for the forthcoming channel tree specification parser:

- change l2_util_setparam() to take an l2_env_t parameter which allows the function to report better error messages.

- completely rewrite l2_util_setparam() to support calls l2_channel_configure(ch, "n1=v1,n2=v2,n3=v3") and/or l2_channel_configure(ch, "n1=%x,n2=%x,n3=%x", v1, v2, v3) instead of l2_channel_configure(ch, "n1,n2,n3", v1, v2, v3)

  This is both a step forward to make the interface of
  l2_channel_configure() more flexible (because one now can directly
  inline values instead of having them to be passed explicitly) and
  allows the spec parser not having to know the type (integer, floating
  point or string) of a parameter (which is important if one wants the
  parser to be independent of the implementing channel handlers).
 By rse. (diff)
2001-Nov-07 12:37    1.19    Check-in [1259]: More preparations for forthcoming channel tree specification parser (especially to allow the parser to determine the handler structure from a handler name without introducing another and this way redundant sub-API):

- add "char *name" to l2_handler_t in order to tag each handler structure with the corresponding channel name

- add l2_env_handler() function to add handler to l2_env_t objects. All l2_handler_xxxx are automatically pre-configured there after l2_env_create().

- change l2_channel_create() to take a "const char *name" (handler name) instead of the "l2_handler_t *h" (handler pointer) to make the stuff consistent and more clear.

- adjust l2_test.c to reflect the changes. By rse. (diff)

2001-Nov-06 16:02    1.18    Check-in [1257]: Change semantics of sibling linkage operations in order to fulfill the requirements in the forthcoming channel tree specification parser. By rse. (diff)
2001-Nov-05 21:39    1.17    Check-in [1256]: Seems like my long years of programming in assembly language still have an impact on my thinking. Change "nop" (assembly mnemonic) to "noop" (english abbreviation) in the name of our no-operation channel. Thanks to Michael for catching this. By rse. (diff)
2001-Nov-04 15:08    1.16    Check-in [1253]: Simplify "null" (discard) output channel to minimum implementation and provide an additional "nop" (no-operation) filter channel for typical use as the root channel in a channel tree. By rse. (diff)
2001-Nov-04 14:21    1.15    Check-in [1248]: Channel-Only Revamping Step 2: - moved code of l2_stream.c into (new) l2_env.c and l2_channel.c - created new l2_env_t and l2_env_xxx() - changed l2_xx_create() functions to also return l2_result_t - moved error handling into l2_env_t - replaced l2_channel_stack() with two new and more flexible l2_channel_link() and l2_channel_unlink() functions - rewritten test stuff in l2_test.c to use new structure - added new l2_channel_env() function for retriving l2_env_t

Puhhh.... By rse. (diff)

2001-Nov-03 23:51    1.14    Check-in [1247]: Channel-Only Revamping Step 1: allow multiple downstream channels in order to approach the later tree-like channel-only structure. By rse. (diff)
2001-Oct-09 17:34    1.13    Check-in [1125]: Veto: back-out latest level-related changes. Sorry, Michael, the padding has to be done in l2_ch_prefix.c only. By rse. (diff)
2001-Oct-09 16:03    1.12    Check-in [1121]: Corrected prefix functionality, because channel write operations do not take level masks as input. By ms. (diff)
2001-Sep-27 09:16    1.11    Check-in [1042]: add a convinient level mask which includes all levels By rse. (diff)
2001-Sep-25 17:22    1.10    Check-in [1034]: Got rid of compile warnings and made minor TRACE modifications. Sorry, but there is no way to use a va_list in a TRACE call. TRACE is a macro that expands anywhere in source, so a va_list declaraction will sometimes violate ANSI c decl specs. By ms. (diff)
2001-Sep-13 21:20    1.9    Check-in [999]: For consistency reasons provide a l2_stream_flush() function which allows one to flush all channel (stacks) in one action. By rse. (diff)
2001-Sep-13 21:18    1.8    Check-in [998]: use assert(3) instead of home-brewn stuff By rse. (diff)
2001-Sep-13 18:32    1.7    Check-in [994]: Added assertion macro for debugging purposes. By ms. (diff)
2001-Sep-12 15:50    1.6    Check-in [957]: First cut for flush mask support. By rse. (diff)
2001-Sep-12 12:24    1.5    Check-in [953]: Merged new L2_LEVEL_NONE enum value from l2.h source file. By ms. (diff)
2001-Sep-12 11:42    1.4    Check-in [951]: Upgraded both stream and channel-level APIs to include new L2_LEVEL parameter design. By ms. (diff)
2001-Sep-10 12:15    1.3    Check-in [913]: no need to double-declare the version stuff By thl. (diff)
2001-Sep-10 11:54    1.2    Check-in [910]: a string is a string ;) By thl. (diff)
2001-Sep-10 11:48    1.1    Check-in [909]: add version information to public API By thl.

CVSTrac 2.0.1