logging question

Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Oct 29 07:00:14 EDT 2004


> Whether there is a way to automatically replicate a logger hierarchy I don't
> know.

Peter is right about the formatting. I'm not sure what's meant by
'replicate a logger hierarchy' - if you mean complete with handlers,
formatters, etc. then the only ways of doing this are by using the
same API calls on both sides, or loading the configuration of both
sides from a shared configuration file. If you are sending logging
events across a network, then the normal configuration is to just have
a socket or datagram handler on the source side of the connection, and
on the sink side the messages are handled as per Peter's code -
formatted, written to file, emailed or whatever. However, you can use
any logger name you like on the receiving side - the one that came in
on the LogRecord, or something prepended/appended to the logger name
in the LogRecord.

Regards,


Vinay Sajip



More information about the Python-list mailing list