Message78619
Can you (Mohammad) say which specific tickets raised the same issue? I
downloaded and ran your script (Windows XP Pro, ActivePython 2.5.2.2)
and had no problems. I created a .bat file with 100 invocations of the
.py file.
Lowell Alleman refers to concurrent use of a single log file by multiple
processes - this is not supported as there is no cross-platform method
of handling multiple process contention for a file. Lowell's handler
uses a portalocker module which is for NT or posix only - if this works
for you, then great.
The preferred way of dealing with logging to a single file from multiple
processes is to use a SocketHandler from the processes, and a separate
socket receiver application which receives the events and logs to file.
An example is in the docs:
http://docs.python.org/library/logging.html#sending-and-receiving-logging-events-across-a-network
I'll change the status of this issue to Pending while I wait for info on
other tickets about this - but multiple process support for any logging
to file (whether rotating or not) is not supported and won't be until
there is a cross-platform mechanism for file locking in the stdlib.
N.B. re your script - logging.shutdown() need not be called by your
script, as logging registers an atexit handler to do this automatically. |
|
Date |
User |
Action |
Args |
2008-12-31 16:09:00 | vinay.sajip | set | recipients:
+ vinay.sajip, mramahi77, lowell87 |
2008-12-31 16:08:59 | vinay.sajip | set | messageid: <1230739739.95.0.429582932791.issue4749@psf.upfronthosting.co.za> |
2008-12-31 16:08:59 | vinay.sajip | link | issue4749 messages |
2008-12-31 16:08:58 | vinay.sajip | create | |
|