To use zlog, patch the kernel with the latest zlog patch and configure the kernel with ``CONFIG_ZLOG'' enabled. ``CONFIG_ZLOG'' is available in ``General Setup'' section.
The zlog patch provides the following logging interface to other parts of the kernel:
Besides having a richer interface, zlog also create a separate logging channel for your debugging purpose. Instead of writing the overloaded ``/var/log/messages'', everything you wrote using ``zlog'' interface is wrote to a user space file: ``/tmp/zlog''. So your debugging information will not be messed up with other kernel print outs.
zlog can be compiled as kernel loadable module. When the zlog module is not loaded, calling to zlog functions will do nothing. This enables the developers to dynamically enable/disable kernel logging simply by load/unload zlog module.
Check the patch for the details. It's a simple patch. The patch was generated based on Linux 2.6.12-rc3. But I think it should work fine with any 2.6 kernel.
I believe relayfs is a much more compresentive soluation than zlog. I am not sure of the details. zlog is simple and just enough to me. :-)