[AG-DEV] Logging levels tip

Susanne Lefvert lefvert at mcs.anl.gov
Wed Jul 6 11:01:21 CDT 2005


Thank you very much Chris. I have created a troubleshooting section
with this problem/solution to the shared applications programmers manual
found online at
http://www.mcs.anl.gov/fl/research/accessgrid/documentation/developer.html
If you have more troubleshooting information that is useful to other
developers, let me know and I'll try to add it to the manual.

Thanks,

Susanne



On Wed, 6 Jul 2005, Christoph Willing wrote:

> I had a logging problem in a shared application which is now solved,
> following a hint from Tom at today's (late) townhall. I thought I'd
> share the solution, since the problem is likely to occur often and I
> couldn't see the solution anywhere obvious in the programming manuals.
>
> The problem was: my new shared had only a very few log.info, log.debug
> calls, yet its log file was filling up fairly quickly to quite a large
> size. Inspection of the log file showed it was filling up due to lots
> of messages from the EventClient; that made sense since the shared app
> had event-related stuff happening every few seconds. How to stop the
> EventClient logging?
>
> The solution is: after initialising the application with
> app.Initialize(), do something like:
> 	loglevels = app.GetLogLevels()
> then, either
> 	loglevels.SetLevel(Log.CRITICAL)
> or even
> 	loglevels.SetLevel(Log.CRITICAL, Log.EventClient)
>
> The second version blocks all but critical & above log messages
> specifically from the EventClient. To allow full logging from the rest
> of the application, I'm using
> 	app.Initialize(name)	# name of shared app
> 	loglevels = app.GetLogLevels()
> 	loglevels.SetLevel(Log.NOTSET, name)
> 	loglevels.SetLevel(Log.CRITICAL, Log.EventClient)
>
>
> The levels (Log.CRITICAL etc.) seem to be just integers, with a bunch
> of preset levels available from the AccessGrid.Log module
> (see:http://www-unix.mcs.anl.gov/fl/research/accessgrid/documentation/
> developer/api/index.html)
>
>
> chris
>
>
> Christoph Willing                        Ph: +61 7 3365 8350
> QPSF Access Grid Manager
> University of Queensland
>
>




More information about the ag-dev mailing list