L4N (Log4Nat) – a logging framework for Natural (by Software AG)

Along with NatUnit (a unit testing framework) we released L4N (or Log4Nat, or Log4Natural ;-)) on SourceForge today: L4N on SourceForge.

L4N offers basic logging functionality for Natural (by Software AG), including:

  • user- and module-specific logging
  • different log levels (e.g. debug, info, error)
  • combinable logging facilities (e.g. work file, INPUT, WRITE, database)

Using the framework is easy, as the following code shows:
LOCAL USING L4NCONST /* some constants like log levels etc. LOCAL USING L4NPARAM /* the parameters (e.g. log text) for calling the actual logging ... * (optional) basic configuration of logging for the current module L4N-DEBUGUSER := 'macke' L4N-LOGTYPES := C-LOGTYPE-FILE + C-LOGTYPE-WRITE L4N-LINENR := *LINE; L4N-DEBUGLEVEL := C-LOGLEVEL-DEBUG INCLUDE L4NENTER ... * the actual logging COMPRESS 'Current value:' #VALUE INTO L4N-LOGTEXT L4N-LINENR := *LINE; L4N-LOGLEVEL := C-LOGLEVEL-INFO INCLUDE L4NLOGIT

L4N is licensed under LGPL v3, so feel free to use it in your (commercial) applications or even help us further develop the framework.

Über Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax