Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my logger.xml file
--------------------
XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
<appender name="FILE" class="org.apache.log4j.FileAppender">
<param name="File" value="log/PacketLog.log"/>
<param name="Append" value="true"/>
         <layout class="org.apache.log4j.PatternLayout">
                    <param name="ConversionPattern" value="[%d{yyyy-MM-dd hh:mm:ss z}] %5p [%c]{2}:%l - %m%n"/>
        </layout>
</appender>

   <root>
      <level value="INFO"/>
      <appender-ref ref="FILE"/>
   </root>

</log4j:configuration>


while running i'm getting this. . . Anyone plz help me
run:
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Level value for root is [INFO].
log4j: root level set to INFO
log4j: Class name: [org.apache.log4j.FileAppender]
log4j: Setting property [file] to [log/PacketLog.log].
log4j: Setting property [append] to [true].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [[%d{yyyy-MM-dd hh:mm:ss z}] %5p [%c]{2}:%l - %m%n].
log4j: setFile called: log/PacketLog.log, true
log4j: setFile ended
log4j: Adding appender named [FILE] to category [root].
Posted
Comments
TorstenH. 23-Jan-15 2:22am    
What is the problem?
Angel Roy 23-Jan-15 2:45am    
While running the above logs are printing in console. Is it correct?
TorstenH. 23-Jan-15 5:53am    
You can run a XML? Pretty cool.
Beside of that there is nothing wrong with the output.

Have you added some logging to your app? does it log?
Angel Roy 23-Jan-15 7:51am    
Thankyou for your reply.
ya it's logging. But i'm getting this line in console. Is it an issue?

1 solution

See http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^]; the <Appender> blocks should be within a <Appenders> </Appenders> pair.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900