Dashboard > Velo > Configuring Logs
Configuring Logs
Added by Asaf Shakarchi, last edited by Asaf Shakarchi on Oct 15, 2007  (view change)
Labels: 
(None)


Persisted diagnostic logs are often very useful in debugging software issues,

Velo sticks with standards all the way as much as possible,
same goes with its logging mechanisms which are based on Jboss's logging facilities (which is based on Apache's log4j project)

Thus, all logging configuration is done on the Jboss application server level,

This section lists some general guidelines regarding JBoss logging mechanisms, its configuration and some advanced topics.

Default log files location

Currently, all log lines from all modules are written all together to one log file that can be located under:

JBOSS_HOME/server/default/log/server.log
Log Rotation

Log rotation occurs everyday and the active log file gets renamed from server.log to server.log.YYYY-MM-DD

Logging Levels

Several Logging Levels available,
each log entry is written with one log level depends on the type of the message, its priority and meaning,
following is a table that summaries all available logging levels and their meaning:

Log Level Description
FATAL For all events that indicate a critical service failure. If a service issues a FATAL error it is completely unable to service requests of any kind.
ERROR For events that indicate a disruption in a request or the ability to service a request. A service should have some capacity to continue to service requests in the presence of ERRORs.
WARN For events that may indicate a non-critical service error. Resumable errors, or minor breaches in request expectations fall into this category. The distinction between WARN and ERROR may be hard to discern and so its up to the developer to judge. The simplest criterion is would this failure result in a user support call. If it would use ERROR. If it would not use WARN.
INFO For service life-cycle events and other crucial related information. Looking at the INFO messages for a given service category should tell you exactly what state the service is in.
DEBUG For log messages that convey extra information regarding life-cycle events. Developer or in depth information required for support is the basis for this priority. The important point is that when the DEBUG level priority is enabled, the JBoss server log should not grow proportionally with the number of server requests. Looking at the DEBUG and INFO messages for a given service category should tell you exactly what state the service is in, as well as what server resources it is using: ports, interfaces, log files, etc.
TRACE For log messages that are directly associated with activity that corresponds requests. Further, such messages should not be submitted to a Logger unless the Logger category priority threshold indicates that the message will be rendered. Use the Logger.isTraceEnabled() method to determine if the category priority threshold is enabled. The point of the TRACE priority is to allow for deep probing of the JBoss server behavior when necessary. When the TRACE level priority is enabled, you can expect the number of messages in the JBoss server log to grow at least a x N, where N is the number of requests received by the server, a some constant. The server log may well grow as power of N depending on the request-handling layer being traced.

Configuration

This section describes how to modify JBoss logging configuration parameters.

Logging Configuration file

The logging configuration is loaded from the jboss server conf/jboss-log4j.xml file. You can edit this to add/change the default appenders and logging thresholds.

Following is the exact full path to this file:

JBOSS_HOME/server/default/conf/jboss-log4j.xml

Modifying Logging Levels

By default only the DEFAULT logging level and above it gets logged,
The simplest way to control the logging level of Velo logs only is to add a new logging category to the log4j configuration file and deciding the log level within this category,
Here are the instructions how to do so:

  • Edit configuration file (please see above for the exact location)
  • Under the appender named "CONSOLE" modify the Threshold parameter as:
    <param name="Threshold" value="ALL"/>
  • Scroll the file below where all categories declarations exist and add a new Velo category as:
    <category name="velo">
      <priority value="ALL"/>
    </category>

ALL in category means that any log on any level will be logged, you can of course set different priority that was represented by the 'Logging Levels' section above.

Advanced Topics

Please refer to the Logging section in the JBoss manual for more advanced topics available here:
http://docs.jboss.org/process-guide/en/html/logging.html

Site running on a free Atlassian Confluence Open Source Project License granted to Safehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators