My boss is away, so I'm taking the opportuinity to clean up my code. I have a set of standards I use for style, formatting, documentation, naming etc. I also have a set of coding idioms I like to follow (Law of Demeter, code metric limits, etc).
My problem is I don't yet have a set of logging idioms, and it shows up in my sporradic logging style. So I'm interested in a "best practices" of logging, or a logging "standard". *Specifically* one that is based on something that makes it arguably superior to other standards. For example, do you log just before you do something: logger.debug("connecting to the database"); or after logger.debug("connected to the database"); or both? Do you log when you throw an exception, catch one, or both? etc... Preachers of aspect oriented programming might not mind seeing a logging statement at the entry and exit of every method. Some would certainly find this to be overkill. What do you all think? -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>