Most Powerful Open Source ERP

Guideline Create Resonable Log Messages

The code will be read in many contexts.
  • Last Update:2019-07-15
  • Version:001
  • Language:en

Create Resonable Log Messages

The code one commits will end up in multiple contexts :

  • Developer testing a site
    He can accept to see many logs, but often he is only interested in his own.
  • Unit test automatons
    Logging can be very useful to track down the problem after the test was over and the problem disappeared along with the site which generated it.
  • Production environment
    Logging has a cost, which is slowing down zope by doing extra disk I/O. Those I/O are done synchronously and so cost much more than any other kind of disk access.
  • Newcomer trying it out,
    Anybody stating an unknown service for the first time can get lost among the heap of log message it might happen to generate. So we must make it as easy as possible for a newcomer to understand whether the system is working at all, which is often harder to tell than developers can imagine.

Keep these "audiences" in mind when adding a log message.