No output from zLOG.LOG on console window
Samuel Schluep <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Developers
The installer of my custom content type used 'print' to output some
messages. Unfortunately I have found out, that printing to the standard
output does not seem to be threadsafe on a Windows box (especially when
running as a service). Thus from time to time an error message appears
"Error Type: IOError", "Error Value: [Errno 9] Bad file descriptor". The
message can undoubtedly be related to a 'print' statement.
Anyhow, I thought that it would be better to output these messages to zLOG:
import zLOG
zLOG.LOG('SilvaDLCMS', zLOG.INFO, 'Copying file into silva core
product:',
'some/file/name' )
The message is nicely output to the 'event.log' but it is not displayed
in the console window (as I hoped). I can not find out how the output
device is selected, e.g. 'INFO(0) Zope Ready to handle requests' is put
to the console and the logfile as well as 'PROBLEM(100) Silva Silva
Documents requires upgrade...'. Others are output only to the log.file
or the console. Is there a way to have my message on both, console and
logfile?
Any suggestions?
Best regards
Sam