More Related Content
Similar to Introduction to logging in django (20)
More from Siva Arunachalam (17)
Introduction to logging in django
- 1. Introduction to Logging in
Django
Sivasubramaniam Arunachalam
July 20, 2013
@sivaa_in
http://www.meetup.com/BangPypers/events/125755952/
- 8. The Users
• End Users
• System Administrators
• Developers
• Support Team
- 22. Log Record
• Log Level
• Logger Name
• Message
– Error Code
– Stack Trace
• Others
– Path, Line #, args, func
- 24. Default Handlers
• StreamHandler
• SocketHandler
• DatagramHandler
• SysLogHandler
• NTEventLogHandler
• MemoryHandler
• FileHandler
– Default
– Rotating
– TimedRotating
– Watched
• NullHandler
• SMTPHandler
• HTTPHandler
- 30. Log Record will be Dropped, If
• Log Level is lower than
– Logger’s Log Level
– Handler’s Log Level
• Filter Chain returns a False
- 35. django.request
• 4xx -> WARNING
• 5xx -> ERROR
• Contexts
– HTTP Status Code (Response)
– Entire Request Object
- 54. Something terribly wrong? Don’t use logging alone.
Raise a Exception to the caller.
. Logging is NOT a way to deal with
exceptions
- 58. Size of the Log Files
• Text Editor Problems
• Archive via Scripts
• Compress to Save Space
- 60. Be aware of cluster nodes
server<id>_node<id>_<logname>.log