> So I'm interested in a "best practices" of logging, or a logging > "standard".
Have a look at ISO-23544-5. Seriously, appart from being consistant I doubt there is any single best way to do it. You should of course keep in mind why exactely it is that you are logging, as this influences the amount, distribution and form of log statements. Some use cases are: - Debug or monitor new or immature code - Generate reports on usage patterns - Trigger alerts on critical failures > For example, do you log just before you do something: Obviously it's a good idea to log before and after operations that take a relatively long time or might hang or simply fail. log.debug("Connecting to x") try: ... catch: log.error("Couldn't connect to x", e) throw e log.info("Connected to x in " + t + "ms") I usually log errors when I catch them (and before I rethrow them, if), since more often than not I am not the one who threw them in the first place. -- Eric Jain -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>