-
Notifications
You must be signed in to change notification settings - Fork 16
Logging Best practices
mrutid edited this page May 30, 2012
·
2 revisions
-
Use a wrapper over logging library
-
Use cyclic files or UDP://syslog
-
Use always the most vervose timestamps (first element in line)
-
Use prefix related to filename/module (second element)
-
Use as many IDS as available in a current execution scope (third element)
-
Use just one line (as far as possible)
-
Use [idParam = JSON] to represent data.
-
Use just three levels: INFO/USER, WARN/ERROR, DEBUG
-
Weird states, possible bugs
-
Exceptions||if(err)
-
Exceptions scope (all related objects)
-
Service accessibility (DB connection error…)