tag:blogger.com,1999:blog-14415229.post5388635985278797019..comments2023-10-10T16:55:02.139+02:00Comments on Chase The Devil: Declaring Your Logger - No ProblemFabienhttp://www.blogger.com/profile/07288327695801480778noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-14415229.post-19246279662407050632007-01-03T14:43:00.000+01:002007-01-03T14:43:00.000+01:00Hi people,
What Heinz proposes in the latest JSN ...Hi people,<br /><br />What Heinz proposes in the latest JSN is something that could be enforced by the logging framework instead of the IDE or (as Rick) coding conventions. I see it more as a message to Ceki Gülcü et al, than for final users.<br /><br />Cheers!Anonymoushttps://www.blogger.com/profile/02874466783900738920noreply@blogger.comtag:blogger.com,1999:blog-14415229.post-88158427689855969222006-12-31T13:20:00.000+01:002006-12-31T13:20:00.000+01:00I don't bother declaring a logger anywhere, I just...I don't bother declaring a logger anywhere, I just use IoC via a hand-rolled 'framework'.<br /><br />context.getLogger().fine("whatever");<br /><br />I don't currently need to be able to have different settings for my logger for different classes, but if I did, I think I'd change that requirement slightly, and have different settings for different <b>categories</b>, resulting in:<br /><br />context.getLogger(GUI).fine("the GUI is working well");<br /><br />context.getLogger(IO).fine("Just wrote something to disk");<br /><br />etc., where GUI and IO are simple enum constants.<br /><br />I don't think that auto-generating code is the best solution in many cases; it shows that something is wrong with the idiom or the language.Ricky Clarksonhttps://www.blogger.com/profile/13845104548520132930noreply@blogger.com