1
2
3
4
5
6
7
8
9
10
11 """Logger
12
13 Log messages from all confmon applications. Logger
14 will use the new python loggin stuff to route log
15 nad filter messages. This is also where
16 lookups of error message translations happens.
17
18
19 $Id: Logger.py,v 1.3 2002/07/19 17:02:41 edahl Exp $"""
20
21 __version__ = "$Revision: 1.3 $"[11:-2]
22
23 import time
24
25 FATAL = 5
26 CRITICAL = 4
27 WARNING = 3
28 INFORMATION = 2
29 DEBUG = 1
30
31 severities = (
32 "NONE",
33 "DEBUG",
34 "WARNING",
35 "CRITICAL",
36 "FATAL"
37 )
38
40 """logger(level, message) -> log message with levl and time"""
41 print time.asctime() + " " + severities[level] + ": " + message
42