如何从Java写入Windows事件日志? [英] How to write from Java to the Windows Event Log?

查看:120
本文介绍了如何从Java写入Windows事件日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从Java写入Windows事件日志?

How can I write from Java to the Windows Event Log?

推荐答案

Log4J是一个基于Java的日志记录实用程序。类 NTEventLogAppender 可用于附加到NT事件日志系统。请参阅此处的文档:

Log4J is a Java-based logging utility. The class NTEventLogAppender can be used to "append to the NT event log system". See the documentation here:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/nt/NTEventLogAppender.html

编辑:有一个较新的版本, Log4j 2 比其前身提供了显着的改进。

There is a newer version, Log4j 2 "that provides significant improvements over its predecessor."

这篇关于如何从Java写入Windows事件日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆