<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Looking at its source code, log4perl is also supposed to use environment variable substitution in configuration property files. So, ${MYAPP_LEVEL} should be substituted if MYAPP_LEVEL is set in the process environment. That does require it always to be defined to some substitutable value, but it's another way of getting configuration out of the application entirely. I used to do this for most web apps (and wrote a similar config mod for Catalyst) because the environment variables could usually be managed from the web container configuration separately from the web app, which avoided any change to production files, even configuration ones. I didn't have to worry about business cases so much, but I myself felt reassured by not touching code.</div><div><br></div><div>All the best</div><div>Stuart</div><br><div><div>On 2013-01-27, at 12:38 PM, Alex Beamish <<a href="mailto:talexb@gmail.com">talexb@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Tom,<div><br></div><div>It is possible to change the Log4perl logging level without making source code changes -- you just adjust a value in the config file. Of course, it makes sense that making even that change on a Production machine would require permission. Changing the logging level would have a non-zero impact on the performance of the application, as well as the rate at which it consumed disk space (assuming you're logging to a disk file -- there are lots of other ways that events can be logged, of course).</div>
<div><br></div><div>Yes, everyone *wants* to write their own logging system -- of course, the reasoning is that a) existing solutions don't meet their needs, b) anyway they don't have time to learn someone elses's system, c) they won't be able to get permission to install someone else's code and d) it's just going to be something simple. These are all political reasons, and not technical reasons, and probably flow from a) programmer laziness, b) programmer hubris and c) edicts from PHBs who last wrote software when it was assembler for IBM mainframes ("in my day ..").</div>
<div><br></div><div>As always, there are many good reasons to not make changes to a Production system on the fly. You'll have to present a business case or risk management assessment for your request, explaining why it's not possible to get the information any other way. It's even possible you may figure out a way while you're writing that up.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Alex<br><br><div class="gmail_quote">On Sat, Jan 26, 2013 at 9:05 PM, Tom Legrady <span dir="ltr"><<a href="mailto:legrady@gmail.com" target="_blank">legrady@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe I can get a quick answer here, or maybe we can discuss it next week.<div><br></div><div>One suposed advantage of Log4Perl is that you can dynamically alter the debug level and get detailed logs when an error has been seen, without changing the code or (significantly) the environment. Does anyone actually use this. At Morgan Stanley it doesn't work that way; it would require a major change which would require permission and would affect a large number of programs, not just one.</div>

<div><br></div><div>Who was it who said, "Logging modules are so wonderful, every team writes their own"?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Tom</div>
</font></span><br>_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
<br></blockquote></div><br><br></div>
_______________________________________________<br>toronto-pm mailing list<br><a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>http://mail.pm.org/mailman/listinfo/toronto-pm<br></blockquote></div><br></body></html>