-
Notifications
You must be signed in to change notification settings - Fork 4
[internal] Logging Design
Note: This page is intended for internal use by the API team to assist implementation and does not contain information about the usage of the API.
This module will contain global loggers which may be accessed by any other module at any time. We will have one logger object called logger which will be created with Python's logging module. It's important to note that this design is not for implementing a thread safe logger class, but for setting up and configuring one that's already provided by Python.
The server must be given privileges via apache to write in this directory. You use, also, may not be able to write to this directory unless you give it permission. This is alright as this will be configured via apache. For testing, you may want to set the file name to ticket-api.log. You also may want to lower the file size to a kilobyte or so to test the filesize rolling.
| name | value |
|---|---|
| filename | /var/log/ticket-api/ticket-api.log |
| format | %(asctime)s [%(levelname)s] [%(module)s.%(funcName)s:%(lineno)d] - %(message)s |
| datefmt | %Y-%m-%d %H:%M:%S |
| rotate handler | RotatingFileHandler |
| max file size | 25M |
| backup count | 9 |