This document provides an overview of the logging capabilities in NetKernel.
The core system logs to the NetKernel System Log.
This log is configured by the file [install]/etc/KernelLogConfig.xml. By default it logs to stderr and to a rolling file in the[install]
The NetKernel system log and application logs use a common configuration syntax. This defines the id, name and handlers for the log.
Log configuration files for application logs are by default located at:
res:/etc/system/LogConfig.xml. However alternate locations can be specified to allow an application to support writing to multiple logs.
If no log configuration is specified in an particular module which is attempting to log then the log configuration is resolved in the Scope of the request, this results in the nearest module which specifies a log configuration to be used. The log configuration isn't resolved and requested like regular resource because the Java logging infrastructure doesn't allow that kind of sophistication. The implication of this is that the file must physically exist in module with the specified path. Imports and filesets etc within the module definition will not effect the operation.
Resource Bundles can be specified by a resource res:/etc/messages.properties within application modules. These are resolved within the request scope of an endpoint.
Resource Bundles follow the standard syntax of:
and can contain parameter substitutions using %1, %2, %3 etc.
The INKFRequestContext extends the INKFLocale interface. This provides a set of methods for formatting messages using the resolved resource bundle, logging messages and creating exceptions with formatted messages.
Setting which levels of logging levels we be logged is configured using the Logging Levels panel on the control panel. These settings are persisted. When a log is first created all levels are enabled
Logs which write using LogFileHandler with the XMLFormatter can be read using the Log Viewer panel in the control panel. If your log doesn't appear on this panel ensure it has this handler.