Not a pythonic solution; but on linux systems I prefer using logrotate to automatically rotate my logs. Check to see if its installed on your system (On ubuntu say there is a directory called /etc/logrotate. D/ with files automatically run via cron).
This may or may not be preferred to having log rotation run from within the application.
Not a pythonic solution; but on linux systems I prefer using logrotate to automatically rotate my logs. Check to see if its installed on your system (On ubuntu say there is a directory called /etc/logrotate. D/ with files automatically run via cron).
This may or may not be preferred to having log rotation run from within the application. It's very configurable, e.g. , allows compression of older files keeps N files via rotate N command, rotates when the cron over "size 100k", and looking at man logrotate, its very straightforward to setup. From the man page here's a sample file # sample logrotate configuration file compress /var/log/messages { rotate 5 weekly postrotate /usr/bin/killall -HUP syslogd endscript } "/var/log/httpd/access.
Log" /var/log/httpd/error. Log { rotate 5 mail [email protected] size 100k sharedscripts postrotate /usr/bin/killall -HUP httpd endscript }.
Thanks, however ther may be upto 100 processes launched from the python script. Would I need an entry for each process and logfile? – mikip Nov 30 '10 at 16:53 You do not need entries for every process/logfile -- it supports wildcards.E.g.
, if all your logs are stored in a directory /var/log/some_app/*. Log can be used to rotate all the log files in that directory. This is actually the third example, that I cut off.
– dr jimbob Nov 30 '10 at 17:18.
Thanks, but I need a logger for each process. Is that possible with this class? – mikip Nov 30 '10 at 16:50 It should be possible if you have an id for each process - then you can bake the id into the filename.
– kotlinski Nov 30 '10 at 16:57.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.