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
* the actual logging
COMPRESS 'Current value:' #VALUE INTO L4N-LOGTEXT
L4N-LINENR := *LINE; L4N-LOGLEVEL := C-LOGLEVEL-INFO
L4N is licensed under LGPL v3, so feel free to use it in your (commercial) applications or even help us further develop the framework.