Logging

Scope: client and server, all versions.

Attribute Required? Default Description
logFileName N logging.xml The default file is deposited in the invocation directory. If the entire path is given, that will be used. NOTE: the path must exist or logging will fail to initialize. I.e., no paths are created.
logName N "oa4mp" The name prepended to each entry in the log file. This is especially useful if several instances of oa4mp are running and you wish to pipe the log messages to a single location.
logSize N 0 The maximum size of the file before the system rolls it over. If rotating files is enabled (by setting the logFileCount greater than 1), then logs are rotated. Otherwise, the log file is simply over-written
logFileCount N 1 The total number of files to have in the rotation. If the count it less than or equal to 1, then only a single log file is maintained.
disableLog4j true Disable log4j. If you are using log 4 java then set this to "false". Since there are potential conflicts with log4j the default is to set this to "true".
debug N "warn" Enable system-wide debugging. This is equivalent to setting the debug attribute in the service tag. See the note there for details.

Note that not specifying a log file will still cause one to be created. If you are enabling rotation of log files, be advised that the name will be interpreted according to Java's logging standard. This means specifying a log file like "/var/www/logs/mylog.log" would create a sequence of files named mylog.log.0, mylog.log.1, ... with the first of these (*.0) being the current log.

Server Example.

<config>
    <service name="my-config">
       <logging
          logFileName="/var/www/log/oa4mp.xml"
          logName="oa4mp"
          logSize="1000000"
          logFileCount="2"
          debug="true"/>
    <!-- rest of config -->
    </service>
 </config>

In this example the log files named "oa4mp.xml.*" are created in the directory "/var/www/log". The maximum size of a single file is 100000 and there will be 2 files in the rotation, numbered 0 (active) and 1. In this case, debugging is enabled for the application. All log entries are prepended with the label "oa4mp", so that if multiple applications use the same log file, the entries are qualified.

Client Example

<config>
    <client name="client-config">
       <logging
          logFileName="/var/www/log/oa4mp.xml"
          logName="oa4mp"
          logSize="1000000"
          logFileCount="2"
          debug="true"/>
    <!-- rest of config -->
    </client >
 </config>
Ditto the description above.

Logging is not working at all. Why?

If you have configured logging and are getting no output, a common reason for this is having a global logging properties file, typically in ${catalina.base}/conf/logging.properties, which overrides the web app settings. A less common issue (and far more maddening) can arise when using Log4j and a properties file in an included library (i.e. embedded in a jar file) overrides your logging properties. This can be hard to track down but a good trick is to diasble log 4 java and see if that helps. The worst offender in this category are some third party libraries in Globus for enabling limited proxy support, and log 4 java might not be usable in those cases.


Last modified 11/20/19.
©2000-2013 Board of Trustees of the University of Illinois.