The LOG libraries

Actually, there are three libararies, liblog.a, liblogserver.a and libloglinux.a. For L4 applications, either liblog.a or liblogserver.a must be linked to the application.

liblog.a outputs the data directly using the external function putchar().

liblogserver.a sends the data to the LOG server, where they are ordered, buffered and optionally send over the network. If the LOG server cannot be contacted, this library outputs the data using the putchar() function.

libloglinux.a allows the LOG macros to be used with Linux applications.

Both L4 libraries offer an own printf() implementation sending its output to special hook-functions instead of printing directly to the screen. This printf() version supports the tag "\%t" to print the current threadid. The alternate version of the tag, "\%\#t", surrounds the thread-id with squared brackets.

Both L4 libraries need not to be initialized. But it is recommended to set the logtag, which is prepended to all outputs done by the program. The logtag is used to easily distinguish between the outputs of different programs and should be 8 characters in length. Normally, the logtag is set automatically at startup to the first 8 characters of the program name (argv[0]). Alternatively, you can define the symbol LOG_tag as a 0-terminated character-field with 9 characters in length, which contains the logtag.

All libraries support the LOG_flush() function. This function ensures that all data logged so far is actually printed. If used with the LOG server, the logserver flushs all its buffered data.


Generated on Wed Apr 11 06:40:52 2012 for Logging and output facility for DROPS by  doxygen 1.5.6