public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev] pljava error logging levels
Date: Mon, 26 Jul 2010 12:00:04 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>

Maybe now I get the point:
1) Session calls ELogHandler.init() that initializes the parameters, including 
the logging level;
2) the Java logging framework does not call publish if the logging level is 
not adeguate, and therefore changes in the log/client_min_messages are not 
seen.

In this situation there are three solutions I guess:
1) each time a logging is successful (i.e., publish has been called), we need 
to reconfigure the log level of the handler. The problem with this is that we 
risk to get unlogged messages for a while, until one pass the publish method.
2) once a new handler is created it must self update its value of the log 
level. The problem with this is that if the handler is kept for a while, the 
changes are not seen. 
3) create a thread that, once a while, reloads the log level and set it into 
the current log level, but this causes a lot of threads (one per handler)
4) keep a map of all created handlers and update them each time a new one is 
created. The problem is that the thread will execute when the control is on 
the java space, due to the locking mechanism of the backend, and therefore it 
will update the handlers with a little lag once a java call is made. This 
should not represent a big problem, because before a java call is made there 
is no need to change the java logging setting. I attach a patch also for this 
solution mixed with the number 2.

Any comments?

Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eloghandler.thread.patch
Type: text/x-patch
Size: 10671 bytes
Desc: not available
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100726/385cc939/attachment.bin;



view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Subject: Re: [Pljava-dev] pljava error logging levels
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox