[Specto-devel] python logger for specto
Brought to you by:
kiddokiddo
|
From: wout c. <wou...@sc...> - 2006-08-11 14:48:31
|
Hello,
I started working on a logging system for specto and now i need your
approval to implement it in specto.
The idea is very simple:
/from logger import logger
w = logger()
w.log("watch updated", "info", "specto.watch")
/so the syntax is: w.log(message, level, sender)
there are 5 levels:
debug, info, warning, error and critical.
debug is only shown in the terminal, everything else is shown in the
terminal and saved in a log file ( /tmp/specto.log )
the format from the terminal is this:
specto.watch INFO watch updated
the log file looks like this:
Fri, 11 Aug 2006 13:44:24 specto.watch INFO watch updated
tell me if you want the format from the log file or terminal to be
different, or if all levels should be saved to the log file or whatever,
just let me know!
questions i have:
where should the log file be saved? (/var/log/specto, ~/.specto/, ...)
should we keep the log class as a different file or are we going to
merge it with another file?
Wout
|