On May 9, 12:52 am, [EMAIL PROTECTED] wrote:
> The infrastructure in which I am work needs the ability to have log
> files written to from multiple instances of the same script and
> potentially from hundreds or more different machines.
>
> I know that the documentation suggests using a networkloggingserver
> but I wanted to know if anyone had any other solutions to allow us to
> build off of the current pythonloggingpackages.
>
Dennis is right - the logging system is threadsafe but not safe
against multiple processes (separate Python instances) writing to the
same file. It certainly sounds like you need a scalable solution - and
having each script send the events to a network logging server seems a
good way of handling the scalability requirement. The logger name used
can include the script instance and machine name, e.g. by starting
with hostname.scriptname.scriptpid... The socket server which receives
the events can demultiplex them based on this information and write
them to a central repository in any arrangement you care to implement
(e.g. into one file or several).

Given that the example in the docs is a (basic) working example, is
there any particular reason why you don't want to follow the suggested
approach?

Regards,

Vinay Sajip

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to