Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在向现有的 Java 应用程序添加 Windows 事件日志记录功能,并且我想利用事件 ID(我们的管理员已经在使用它们)。使用 NTEventLogAppender 记录时,有没有办法指定事件 ID?
从我目前的研究来看,似乎无法从默认的 4096 修改事件 ID。
查看log4jna。它是 log4j NTEventLogAppender 的替代品。它现在没有做你想做的事,但它“这么接近”。如果您仍然需要它,我们可以努力实现它。