jtu...@objektfabrik.de
unread,Mar 2, 2012, 5:41:07 AM3/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to va-sma...@googlegroups.com
Hi
I am playing with log4s again, and it seems I've found a bug.
What happened:
I played a bit with ini settings and a development image. After some changing values, I saved my image and started it anew.
One of the changes made to the .ini was the name of the daily rolling log file.
After restarting the image log4s still appended to the old file instead of creating a new one with the new name from the ini file. So it seems that the saved singleton instance was still alive and happily doings its job, using the settings it was saved with instead of the changed settings from the ini file.
Not knowing if this is expected behaviour, I'll try and tell you what MY expectation was:
If I start an image that was saved with a running logger and its appenders, it should always respect what's in my ini file. So it should either throw away its instance on quitting an image or on starting it and finding some ini entries in the log4s stanza.
I know you could argue that this is only relevant in a development image, because you usually don't save production images. I'd partly agree, but the risk here is that a production image gets packaged out of an image that had a running logger (maybe the one used during a hudson-initiated automated build job as we use it on our projects). So the production image ends up with a logger configuration that is completely screwed in production.
So there is two possibilities one could solve this:
a) projects are told to start their logging by hand, making sure whatever is present in the image when an application starts is either thrown away or at least checked for its corectness.
b) the code does it automatically
I haven't checked if this only happens if nothing else than the rolling file name is changed, so maybe this is really a very special tiny problem in some corner ;-)
Joachim