Skip to content

Django log file rotation

Administrator requested to merge feature/django-log-file-rotation into master

Write logs in a file. Also in the console (journal).

Add a formatter to write the date and time in the log entries.

Rotate the log files with more than 50MB.

Set the timezone to Europe/Madrid.

Formatter:

[<datetime>] <level [<module>:<line>] <message>

Exemple:

[13/Jul/2020 13:28:18] INFO [api.views.OrderItemView:15] Request recieved by Django. Request body: {...}
Edited by Administrator

Merge request reports