As chrestomanci has pointed out, Log4Perl already has the functionality built in to determine if the configuration file has changed between logging calls.
So, just adjust the default log-level and rewrite the file. The change will flow naturally from there. No need to be mucking with the additional complication of cross-thread communications....
----
I Go Back to Sleep, Now.
OGB
| [reply] |
The solution of watching a log file doesn't work of course if you choose to write your config options in the code versus a configuration file. What I found to work is to explicitly call the init() function to re-initialize after making the changes you desire to the config options. The catch is that this must be done within each thread. I wrote a little about this here: http://andydeese.wordpress.com/
| [reply] |