是否有一种方式(内置或使用ColdFusion安装的基础Java库),可以使ColdFusion 10应用程序将消息写入Windows事件日志?
是否有一种方式(内置或使用ColdFusion安装的基础Java库),可以使ColdFusion 10应用程序将消息写入Windows事件日志?
oLogger = createObject("java", "org.apache.log4j.Logger");
oNTAppender = createObject("java", "org.apache.log4j.nt.NTEventLogAppender");
oLayout = createObject("java", "PatternLayout").init("[%c][%l][%p][%thread]: %m%n");
// create the appender with your source and layout
oNTAppender = oNTAppender.init("[your source text]", oLayout);
// add this appender to the logger
oLogger.addAppender(oNTAppender);