This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients lowell87, mramahi77, vinay.sajip
Date 2008-12-31.16:08:58
SpamBayes Score 3.3940984e-07
Marked as misclassified No
Message-id <1230739739.95.0.429582932791.issue4749@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-12-31 16:09:00vinay.sajipsetrecipients: + vinay.sajip, mramahi77, lowell87
2008-12-31 16:08:59vinay.sajipsetmessageid: <1230739739.95.0.429582932791.issue4749@psf.upfronthosting.co.za>
2008-12-31 16:08:59vinay.sajiplinkissue4749 messages
2008-12-31 16:08:58vinay.sajipcreate