`
sogo6
  • 浏览: 110136 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

python 记录操作系统日志

阅读更多
def writeSysLog(message):
    if 'win32' in sys.platform:
        os.popen('eventcreate /T information /ID 1000 /D "%s"'%message)
    else:
        os.popen('logger -p local0.info "%s"'%message)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics