I need to run a lot of Django management commands in the crontab and want to log the output of each run to a special timestamped file. Is there a Django or Python module to help me do this or do I just have to roll my own?
+3
A:
You can use the Python logging package which is part of Python, see my answer to another question about elegant setup of logging in Django. You can inspect sys.argv
to determine how you want to do logging, e.g. redirect to different files for different commands.
Vinay Sajip
2010-04-02 14:40:42
+2
A:
Have a look at django-jogging. It's a breeze to set up all kinds of custom logging with it.
piquadrat
2010-04-02 15:36:00