Think before you speak, read before you think.

在python中使用syslog

在开始记录前,调用openlog()函数初始化syslog

openlog([ident[, logopt[, facility]]])

ident标识字符串

logopt代表选项

现在初始化之后

syslog([priority], message)

message是想记录的简单字符串。priority表明这条信息的重要性。它被syslog配置文件用来确定对一个给定的信息该如何处理。

http://docs.python.org/library/syslog.html


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *