Re: [Specto-devel] python logger for specto
Brought to you by:
kiddokiddo
|
From: Kiddo <nek...@gm...> - 2006-08-11 15:52:34
|
So far, seems good for me, but I'd like other's input on this too. The only
suggestion I have though is that the log file should be saved in ~/.specto.
The reason I think this is that specto is a user-level application, it is to
be used by multiple users on a single computer (remember our world
domination purposes?). I think (but I may be wrong there, it's just a guess)
that /var/log and such are places for big "daemon" applications such as
apache (that cannot be controled by anyone else than root or its
equivalent?) to store the logs.
In the case of specto, different users may have different problems to
report, and so I think the logs should be kept in their home directory (oh
yeah, please make the permissions the same as watches.list... actually, the
whole ~/.specto folder should be RWX permissions only for the owner,
security-speaking). Because one user might have problems, whereas another
one would not, on the same computer.
Thoughts?
On 8/11/06, wout clymans <wou...@sc...> wrote:
>
> 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
>
|