configuring the log files

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

configuring the log files

Mic Bowman
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


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: [Opensim-users] configuring the log files

Ursula MATOVA
+1

That could be nice if that configuration option could be included in the distribution, because when you run OpenSim in something like "production" mode, your log files are growing so fast that you could get some performances issues writing in them.

I'm using such configuration options for a very very long time and it's very useful.

Regards.
Ursula.

----- Mail Original -----
De: "Mic Bowman" <[hidden email]>
À: [hidden email], [hidden email]
Envoyé: Mercredi 20 Janvier 2010 09h03:01 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: [Opensim-users] configuring the log files


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


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: [Opensim-users] configuring the log files

justincc
Ursula MATOVA wrote:
> +1
>
> That could be nice if that configuration option could be included in the distribution, because when you run OpenSim in something like "production" mode, your log files are growing so fast that you could get some performances issues writing in them.
>
> I'm using such configuration options for a very very long time and it's very useful.

I've often thought about changing the default OpenSim.exe logging configuration in a similar manner
so if there are no major objections I may try and do this fairly soon.

By the way, there is a wiki page for logging in OpenSim at

http://opensimulator.org/wiki/Logging

which already contains logging information.  There is /some/ useful information on the wiki :)

>
> Regards.
> Ursula.
>
> ----- Mail Original -----
> De: "Mic Bowman" <[hidden email]>
> À: [hidden email], [hidden email]
> Envoyé: Mercredi 20 Janvier 2010 09h03:01 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
> Objet: [Opensim-users] configuring the log files
>
>
> 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
>
>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users


--
Justin Clark-Casey (justincc)
http://justincc.org
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: [Opensim-users] configuring the log files

Karen_Palen
I like the idea of the rotating log file and have just added it to my sim.

Earlier I changed:
> > <root>
> > <level value="DEBUG" />

to
> > <root>
> > <level value="INFO" />

This gives a less verbose, but still gives the essential information for normal operation.

I would certainly suggest this for a default setup. It is easy enough to change if there is a problem.

--- On Wed, 1/20/10, Justin Clark-Casey <[hidden email]> wrote:

> From: Justin Clark-Casey <[hidden email]>
> Subject: Re: [Opensim-users] configuring the log files
> To: [hidden email], [hidden email]
> Date: Wednesday, January 20, 2010, 3:11 AM
> Ursula MATOVA wrote:
> > +1
> >
> > That could be nice if that configuration option could
> be included in the distribution, because when you run
> OpenSim in something like "production" mode, your log files
> are growing so fast that you could get some performances
> issues writing in them.
> >
> > I'm using such configuration options for a very very
> long time and it's very useful.
>
> I've often thought about changing the default OpenSim.exe
> logging configuration in a similar manner
> so if there are no major objections I may try and do this
> fairly soon.
>
> By the way, there is a wiki page for logging in OpenSim at
>
> http://opensimulator.org/wiki/Logging
>
> which already contains logging information.  There is
> /some/ useful information on the wiki :)
>
> >
> > Regards.
> > Ursula.
> >
> > ----- Mail Original -----
> > De: "Mic Bowman" <[hidden email]>
> > À: [hidden email],
> [hidden email]
> > Envoyé: Mercredi 20 Janvier 2010 09h03:01 GMT +01:00
> Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
> > Objet: [Opensim-users] configuring the log files
> >
> >
> > 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
> >
> >
> > _______________________________________________
> > Opensim-users mailing list
> > [hidden email]
> > https://lists.berlios.de/mailman/listinfo/opensim-users
> > _______________________________________________
> > Opensim-users mailing list
> > [hidden email]
> > https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
> --
> Justin Clark-Casey (justincc)
> http://justincc.org
> http://twitter.com/justincc
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users
>


     
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users