jboss - custom appender log4j settings -urgent

dmore
dmore used Ask the Experts™
on
Hi All
I am deploying my application on jboss server.I have written a custom appender, which I want to configure in log4j.xml  and I have added that in the following manner: when my server starts up it reads starts up the paender straight away and throws error and hence application is not deployed.As you can see below Iam trying to limit the scope to com.restart.WriteRestartLog class but it does not work any ideas please

<appender name="RESTART" class="com.RestartFileLogAppender">
     <param name="directory" value="${jboss.server.home.dir}"/>
     <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%m%n"/>
          </layout>
   </appender>

   <logger name="com.restart.WriteRestartLog" additivity="false">
      <level value="RESTART"/>
      <appender-ref ref="RESTART"/>
   </logger>


   <category name="com.RestartFileLogAppender">
         <priority value="RESTART"/>
         <appender-ref ref="RESTART"/>
   </category>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Principal Technologist
Commented:
>> Iam trying to limit the scope to com.restart.WriteRestartLog

>> class="com.RestartFileLogAppender">
>> name="com.RestartFileLogAppender">

Should that also have com.restart as the package name?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial