How to write from Java to the Windows Event Log?

后端 未结 4 2178
你的背包
你的背包 2020-12-14 17:48

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

4条回答
  •  星月不相逢
    2020-12-14 18:00

    You can use JNA to write to the Event Log directly without the need of any native DLLs. See Advapi32 and Advapi32Util classes for various event log methods (ships since JNA 3.2.8).

    If you're using Log4j, consider Log4jna instead of NTEventLogAppender.

提交回复
热议问题