Overview Description: All log4j priority types are logged as "Information" type in the NT EventLog regardless of the priority assigned when calling log4j logging methods. Steps to Reproduce: 1) Execute the example code "NTMin.java" located in the org\apache\log4j\nt\test package. (Provided with 1.0 version of log4j). Actual Results: Log messages are successfully written to the NT EventLog but they all have the same priority ("Information"). Expected Results: Of the six messages that are logged by the example code, 3 should appear as "Information" type, 2 should appear as "Error" type, and 1 should appear as "Warning" type. Build Date & Platform: Windows 2000, Version 5.0, Build 2195
Hello Jennifer, The problem is due to the wrong direction of comparisons in the appende method of NTEventLogAppender. The correct comparison is: // Anything above FATAL or below DEBUG is labeled as INFO. if (nt_category > FATAL || nt_category < DEBUG) { nt_category = INFO; } I have changed this for the next release. Ceki