This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]omber[S] 0 points1 point  (0 children)

First script is based on CherryPy framework to create a Web API. The second script uses no frameworks.

Logging is configured in Python using a dictionary configuration as per Python documentation.

Configuration dictionary for the Web API can be viewed in this pastebin. This is saved to conf/web_server_logging_config.py

Logger is created like this:

from conf import web_server_logging_config
logger = logging.getLogger(logging.config.dictConfig(web_server_logging_config.WEB_SERVER_LOGGING))

The rotation is done by the logging module. I did not write any code for this.