1 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
12 # string containing last log entry,
13 # as the code is flawed to get this otherwise
19 syslog.syslog(p, str(s))
21 syslog.syslog(p, repr(s))
22 f = open(path.log_file, "a")
23 f.write("%s [%s]: %s\n" % (time.asctime(), builder, s))
28 log(syslog.LOG_ALERT, "PANIC: %s" % s)
29 raise Exception, "PANIC: %s" % str(s)
32 log(syslog.LOG_ALERT, "alert: %s" % s)
35 log(syslog.LOG_ERR, "error: %s" % s)
38 log(syslog.LOG_WARNING, "warning: %s" % s)
41 log(syslog.LOG_NOTICE, "notice: %s" % s)
43 def open_syslog(name, f):
46 syslog.openlog(name, syslog.LOG_PID, f)