0 Replies Latest reply on Apr 27, 2011 5:20 AM by trixky

    Problems with NTEventLogAppender and Jboss Logging

    trixky Newbie

      Hello everybody,

       

      I try to send logs to the Event Viewer of Windows Server 2003.

      Here is the process i followed :

       

      First i put the NTEventLogAppender.dll find with the log4j archive in C:\WINDOWS\system32

      Second, i edited the file : jboss-logging.xml

       

      I added this :

       

      <log4j-appender name="NTLOG" class="org.apache.log4j.nt.NTEventLogAppender">

            <error-manager>

               <only-once/>

            </error-manager>

       

                  <level name="WARN"/>         

            <formatter>

               <pattern-formatter pattern="%p [%c] - [%d] %m%n"/>

            </formatter>

         </log4j-appender>

       

      and that :

       

      <logger category="com.myapp" additivity="false">

           <level name="WARN" />

      <handlers>

               <handler-ref name="NTLOG"/>

            </handlers>

         </logger>

       

      But nothing is send to the Event Viewer. At least, i can't see anything in the event viewer window.


      Here some other intel : when i look into regedit, i can see that the dll is correctly seen, and it appears as Log4j.

       

      What am i doing wrong ?

       

      Thank for your answer.