Metadata Server logs information during its operation to the SuperSERVER logs directory (for example: C:\ProgramData\STR\SuperSERVER SA\logs if you installed SuperSERVER to the default location):
- The settings for Metadata Server logging are defined in C:\ProgramData\STR\SuperSERVER SA\log4j.mdcorbaserver_sa.xml
- The log file is configured to roll to a new file on a daily basis.
You can change the logging level, if necessary.
Logging is provided by the Apache component Log4j, which has six levels of logging. These levels are (listed in order, from most verbose to least verbose):
|Most verbose. All possible messages are written to the logs.|
|Logs everything except |
|This is the default setting. Recommended for production use. Logs |
|Logs only |
|Logs only |
|Least verbose. Only |
Increase or Decrease the Amount of Information Logged
By default, Metadata Server is configured to log at the
INFO level. This means that all
FATAL messages are logged.
You can change this by editing this section:
For example, to change to the
DEBUG level, you could change this to:
This will configure Metadata Server to log
DEBUG messages, in addition to
Change the Log Level for an Individual Message Context
The above example changes the root logging level. This is a global setting that applies to all log messages from Metadata Server.
If you need finer grained control over logging, you can set different logging levels for different types of message (referred to as "message contexts").
To configure logging for a specific message context, add a section similar to the following (replace
<message_context> with the context and
<level> with one of the levels listed above):
You can find the message context by looking at the existing log messages; the context appears at the start of the message after the time and the logging level.
For example, the following excerpt from a Metadata Server log shows two messages. The first has the context
MetadataSERVER.Startup and the second message has the context
Suppose you wanted to set the global logging level to
WARN, but log
MetadataSERVER.Connection messages at the higher
INFO level. You could do this by:
Updating the root logger setting to:
Adding the following context specific setting at the bottom of the properties file:
Change the Log File Location
By default the log file is written to the SuperSERVER logs directory. You can change the location of the log output if necessary.
You can change the log file location by editing the
FileNamePattern in the
File setting controls the filename of the current log file, while the
FilenamePattern setting in the
<rollingPolicy/> section controls the name that will be used when the log file rolls at the end of each day.
Other SuperSTAR components have their own individual logging settings. For more information, see:
In addition, SuperSTAR has an optional Audit Logging component that can be used to track user activity.
For more information about Log4j, refer to the Apache documentation: http://logging.apache.org/log4j/1.2/manual.html.