[Opensim-users] configuring the log files
Mic Bowman
cmickeyb at gmail.com
Wed Jan 20 08:03:01 UTC 2010
a discussion on the opensim IRC today left me wondering if most people are
missing information on configuring the logging in OpenSim. if you're running
a simulator you've probably run across the OpenSim.exe.config file. and
possibly even changed the logging level from Debug to something less
verbose. i thought i'd pass on another tip... you can set up log file
rotation by adding another appender to the configuration (this gets around
the problem of having *really* big OpenSim.log files lying around). add the
following just after the close tag ("</appender>") for the
"LogFileAppender":
<appender name="LogFileRotate"
type="log4net.Appender.RollingFileAppender">
<file value="OpenSim.log-" />
<rollingstyle value="Date" />
<appendToFile value="true" />
<maximumFileSize value="500KB" />
<maxSizeRollBackups value="5" />
<staticlogfilename value="false" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{HH:mm:ss} %-5level - %logger
%message%newline" />
</layout>
</appender>
and then add change the root tag like this:
<root>
<level value="DEBUG" />
<appender-ref ref="Console" />
<appender-ref ref="LogFileRotate" />
</root>
that will create the log files of the form OpenSim.log-yyyy-mm-dd with a
maximum size of 500KB. we run multiple simulators & put all our logs into a
single directory by changing the <file> tag to point to the log directory.
this configuration was inspired by the examples in the log4net wiki:
http://logging.apache.org/log4net/release/config-examples.html
--mic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20100120/bd4ec342/attachment.html>
More information about the Opensim-users
mailing list