I want to log debug ,info and error message of Nhibernate.SQL. I am not able to log all the messages.
Can i use config as below?
<logger name="NHibernate.SQL">
<level value="DEBUG" />
</logger>
<logger name="NHibernate.SQL">
<level value="INFO" />
</logger>
<logger name="NHibernate.SQL">
<level value="ERROR" />
</logger>
or do I need to use as below?
<logger name="NHibernate.SQL">
<level value="DEBUG" />
<level value="INFO" />
<level value="ERROR" />
</logger>
The level supplied to a logger is the minimum level to log, so you just need this to log DEBUG or above:
logger name="NHibernate.SQL">
<level value="DEBUG" />
</logger>
Note that this will also log any WARN or FATAL log entries.
Related
I am using jboss-6.1.0.Final, when I start my server, log file(boot.log) size getting increased and increased its 16GB first time.
I stop my application server and again start but issue still persist....! and size of file is 20GB and again 16GB.
I google lot...! I found below property in {JBOSS_HOME}\server\server_name\deploy\jboss-logging.xml for server.log .
<size-rotating-file-handler
file-name="${jboss.server.log.dir}/server.log"
name="FILE"
autoflush="true"
append="true"
rotate-size="500k"
max-backup-index="2">
<error-manager>
<only-once/>
</error-manager>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
</formatter>
</size-rotating-file-handler>
I change
file-name="${jboss.server.log.dir}/server.log"
to
file-name="${jboss.server.log.dir}/boot.log"
but its not working... Is it right way to do so...? or any other way to achieve same
This is my jboss-logging.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Logging System Configuration -->
<!-- -->
<!-- ===================================================================== -->
<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0">
<!-- ================================= -->
<!-- Preserve messages in a local file -->
<!-- ================================= -->
<!-- A time/date based rolling handler -->
<periodic-rotating-file-handler
file-name="${jboss.server.log.dir}/server.log"
name="FILE"
autoflush="true"
append="true"
suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
<error-manager>
<only-once/>
</error-manager>
<formatter>
<!-- To revert back to simple stack traces without JAR versions, change "%E" to "%e" below. -->
<!-- Uncomment this to get the class name in the log as well as the category
<pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %s%E%n"/>
-->
<!-- Uncomment this to log without the class name in the log -->
<pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
</formatter>
</periodic-rotating-file-handler>
<!-- A size based file rolling appender
<size-rotating-file-handler
file-name="${jboss.server.log.dir}/server.log"
name="FILE"
autoflush="true"
append="true"
rotate-size="500k"
max-backup-index="5">
<error-manager>
<only-once/>
</error-manager>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
</formatter>
</size-rotating-file-handler>
-->
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<console-handler name="CONSOLE" autoflush="true" target="System.out">
<error-manager>
<only-once/>
</error-manager>
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>
</formatter>
</console-handler>
<!-- ====================== -->
<!-- More Appender examples -->
<!-- ====================== -->
<!-- Buffer events and log them asynchronously
<async-handler name="ASYNC">
<error-manager>
<only-once/>
</error-manager>
<sub-handlers>
<handler-ref name="FILE"/>
<handler-ref name="CONSOLE"/>
<handler-ref name="SMTP"/>
</sub-handlers>
</async-handler>
-->
<!-- EMail events to an administrator
<log4j-appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
<error-manager>
<only-once/>
</error-manager>
<level name="ERROR"/>
<properties>
<property name="to">admin#myhost.domain.com</property>
<property name="from">nobody#myhost.domain.com</property>
<property name="subject">JBoss Sever Errors</property>
<property name="SMTPHost">localhost</property>
<property name="bufferSize">10</property>
</properties>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
</formatter>
</log4j-appender>
-->
<!-- Syslog events
<log4j-appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
<error-manager>
<only-once/>
</error-manager>
<properties>
<property name="facility">LOCAL7</property>
<property name="facilityPrinting">true</property>
<property name="syslogHost">localhost</property>
</properties>
<formatter>
<pattern-formatter pattern="[%d,%c{1}] %m%n"/>
</formatter>
</log4j-appender>
-->
<!-- Log events to JMS (requires a topic to be created)
<log4j-appender name="JMS" class="org.apache.log4j.net.JMSAppender">
<error-manager>
<only-once/>
</error-manager>
<level name="ERROR"/>
<properties>
<property name="topicConnectionFactoryBindingName">
--><!-- Use injection so that an implicit dependency is formed - TODO: get the correct property name --><!--
<b:inject bean="myTopicBiding" property="name"/>
</property>
<property name="topicBindingName">topic/MyErrorsTopic</property>
</properties>
</log4j-appender>
-->
<!-- Log events through SNMP
<log4j-appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
<error-manager>
<only-once/>
</error-manager>
<level name="DEBUG"/>
<properties>
<property name="implementationClassName">org.apache.log4j.ext.JoeSNMPTrapSender</property>
<property name="managementHost">127.0.0.1</property>
<property name="managementHostTrapListenPort">162</property>
<property name="enterpriseOID">1.3.6.1.4.1.24.0</property>
<property name="localIPAddress">127.0.0.1</property>
<property name="localTrapSendPort">161</property>
<property name="genericTrapType">6</property>
<property name="specificTrapType">12345678</property>
<property name="communityString">public</property>
<property name="forwardStackTraceWithTrap">true</property>
<property name="applicationTrapOID">1.3.6.1.4.1.24.12.10.22.64</property>
</properties>
<formatter>
<pattern-formatter pattern="%d,%p,[%t],[%c],%m%n"/>
</formatter>
</log4j-appender>
-->
<!-- Emit events as JMX notifications
<log4j-appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
<error-manager>
<only-once/>
</error-manager>
<level name="WARN"/>
<properties>
<property name="objectName">jboss.system:service=Logging,type=JMXNotificationAppender</property>
</properties>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] %m"/>
</formatter>
</log4j-appender>
-->
<!-- Security AUDIT Appender
<periodic-rotating-file-handler
name="AUDIT"
autoflush="true"
file-name="${jboss.server.log.dir}/audit.log"
suffix=".yyyy-MM-dd"
append="true">
<error-manager>
<only-once/>
</error-manager>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] (%t:%x) %m%n"/>
</formatter>
</periodic-rotating-file-handler>
-->
<!-- =============================================== -->
<!-- Limit categories -->
<!-- if enabling "trace" at root logger level, -->
<!-- use limit category settings to disable trace -->
<!-- for packages that you don't want to trace -->
<!-- =============================================== -->
<!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
<logger category="org.apache">
<level name="INFO"/>
</logger>
<!-- Limit the jacorb category to WARN as its INFO is verbose -->
<logger category="jacorb">
<level name="WARN"/>
</logger>
<!-- Limit JSF to INFO as its FINE is verbose -->
<logger category="javax.enterprise.resource.webcontainer.jsf">
<level name="INFO"/>
</logger>
<!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
<logger category="org.jgroups">
<level name="WARN"/>
</logger>
<!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
<logger category="org.quartz">
<level name="INFO"/>
</logger>
<!-- Limit the com.sun category to INFO as its FINE is verbose -->
<logger category="com.sun">
<level name="INFO"/>
</logger>
<!-- Limit the sun category to INFO as its FINE is verbose -->
<logger category="sun">
<level name="INFO"/>
</logger>
<!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
<logger category="javax.xml.bind">
<level name="INFO"/>
</logger>
<!-- Limit the springframework category to WARN-->
<logger category="org.springframework">
<level name="WARN"/>
</logger>
<!-- Limit JBoss categories
<logger category="org.jboss">
<level name="INFO"/>
</logger>
-->
<!-- Or limit individual JBoss categories
<logger category="org.jboss.web">
<level name="INFO" />
</logger>
<logger category="org.jboss.tm">
<level name="INFO" />
</logger>
<logger category="org.jboss.jdbc">
<level name="INFO" />
</logger>
<logger category="org.jboss.on">
<level name="INFO" />
</logger>
<logger category="org.jboss.services">
<level name="INFO" />
</logger>
<logger category="org.jboss.bootstrap">
<level name="INFO" />
</logger>
<logger category="org.jboss.kernel">
<level name="INFO" />
</logger>
<logger category="org.jboss.beans">
<level name="INFO" />
</logger>
<logger category="org.jboss.injection">
<level name="INFO" />
</logger>
<logger category="org.jboss.annotation">
<level name="INFO" />
</logger>
<logger category="org.jboss.system">
<level name="INFO" />
</logger>
<logger category="org.jboss.mx">
<level name="INFO" />
</logger>
<logger category="org.jboss.jmx">
<level name="INFO" />
</logger>
<logger category="org.jboss.invocation">
<level name="INFO" />
</logger>
<logger category="org.jboss.classloader">
<level name="INFO" />
</logger>
<logger category="org.jboss.classloading">
<level name="INFO" />
</logger>
<logger category="org.jboss.deployment">
<level name="INFO" />
</logger>
<logger category="org.jboss.deployers">
<level name="INFO" />
</logger>
<logger category="org.jboss.dependency">
<level name="INFO" />
</logger>
<logger category="org.jboss.metadata">
<level name="INFO" />
</logger>
<logger category="org.jboss.detailed">
<level name="INFO" />
</logger>
<logger category="org.jboss.logging">
<level name="INFO" />
</logger>
<logger category="org.jboss.logbridge">
<level name="INFO" />
</logger>
<logger category="org.jboss.aop">
<level name="INFO" />
</logger>
<logger category="org.jboss.joinpoint">
<level name="INFO" />
</logger>
<logger category="org.jboss.util">
<level name="INFO" />
</logger>
<logger category="org.jboss.ha">
<level name="INFO" />
</logger>
<logger category="org.jboss.resource">
<level name="INFO" />
</logger>
<logger category="org.jboss.varia">
<level name="INFO" />
</logger>
<logger category="org.jboss.net">
<level name="INFO" />
</logger>
<logger category="org.jboss.security">
<level name="INFO" />
</logger>
<logger category="org.jboss.console">
<level name="INFO" />
</logger>
<logger category="org.jboss.wsf">
<level name="INFO" />
</logger>
<logger category="org.jboss.ejb">
<level name="INFO" />
</logger>
<logger category="org.jboss.ejb3">
<level name="INFO" />
</logger>
<logger category="org.jboss.jpa">
<level name="INFO" />
</logger>
<logger category="org.jboss.vfs">
<level name="INFO" />
</logger>
<logger category="org.jboss.xb">
<level name="INFO" />
</logger>
<logger category="org.jboss.naming">
<level name="INFO" />
</logger>
<logger category="org.jboss.wsf">
<level name="INFO" />
</logger>
<logger category="org.jboss.ws">
<level name="INFO" />
</logger>
<logger category="org.jboss.mail">
<level name="INFO" />
</logger>
<logger category="org.jboss.monitor">
<level name="INFO" />
</logger>
<logger category="org.jboss.remoting">
<level name="INFO" />
</logger>
<logger category="org.jboss.profileservice">
<level name="INFO" />
</logger>
<logger category="org.jboss.cache">
<level name="INFO" />
</logger>
<logger category="org.jboss.proxy">
<level name="INFO" />
</logger>
<logger category="org.jboss.jms">
<level name="INFO" />
</logger>
<logger category="org.jboss.messaging">
<level name="INFO" />
</logger>
<logger category="org.jboss.webbeans">
<level name="INFO" />
</logger>
<logger category="org.jboss.managed">
<level name="INFO" />
</logger>
-->
<!-- Limit Arjuna transaction manager -->
<logger category="com.arjuna.ats">
<level name="INFO" />
</logger>
<!-- Limit Hibernate
<logger category="org.hibernate">
<level name="INFO" />
</logger>
-->
<!-- Limit Ajax4jsf
<logger category="org.ajax4jsf">
<level name="INFO" />
</logger>
-->
<!-- Limit JNP
<logger category="org.jnp">
<level name="INFO" />
</logger>
-->
<!-- Limit the JSR77 categories -->
<logger category="org.jboss.management">
<level name="INFO"/>
</logger>
<!-- Limit the verbose facelets compiler -->
<!-- Also suppress error with legacy facelets (JBAS-7600) -->
<logger category="facelets.compiler">
<level name="WARN"/>
<filter>
<not>
<match pattern="Error\sLoading\sLibrary.*jsf-libs/jsf-impl"/>
</not>
</filter>
</logger>
<!-- Limit the verbose ajax4jsf cache initialization
<logger category="org.ajax4jsf.cache">
<level name="WARN"/>
</logger>
-->
<!-- Limit the verbose embedded jopr categories
<logger category="org.rhq">
<level name="WARN"/>
</logger>
-->
<!-- Limit the verbose seam categories
<logger category="org.jboss.seam">
<level name="WARN"/>
</logger>
-->
<!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
<logger category="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
<level name="TRACE"/>
</logger>
-->
<!-- Category specifically for Security Audit Provider
<logger category="org.jboss.security.audit.providers.LogAuditProvider" additivity="false">
<level name="TRACE"/>
<appender-ref ref="AUDIT"/>
</logger>
-->
<!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
<logger category="org.jboss.serial">
<level name="INFO"/>
</logger>
<!-- Decrease the priority threshold for the org.jboss.varia category
<logger category="org.jboss.varia">
<level name="DEBUG"/>
</logger>
-->
<!-- Enable JBossWS message tracing
<logger category="org.jboss.ws.core.MessageTrace">
<level name="TRACE"/>
</logger>
-->
<!-- Enable System log message tracing
<logger category="org.jboss.system">
<level name="TRACE"/>
</logger>
<logger category="org.jboss.ejb.plugins">
<level name="TRACE"/>
</logger>
-->
<!--
| Logs these events to SNMP:
- server starts/stops
- cluster evolution (node death/startup)
- When an EJB archive is deployed (and associated verified messages)
- When an EAR archive is deployed
<logger category="org.jboss.system.server.Server">
<level name="INFO"/>
<handlers>
<handler-ref name="TRAP_LOG"/>
</handlers>
</logger>
<logger category="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
<level name="INFO"/>
<handlers>
<handler-ref name="TRAP_LOG"/>
</handlers>
</logger>
<logger category="org.jboss.deployment.MainDeployer">
<level name="ERROR"/>
<handlers>
<handler-ref name="TRAP_LOG"/>
</handlers>
</logger>
<logger category="org.jboss.ejb.EJBDeployer">
<level name="INFO"/>
<handlers>
<handler-ref name="TRAP_LOG"/>
</handlers>
</logger>
<logger category="org.jboss.deployment.EARDeployer">
<level name="INFO"/>
<handlers>
<handler-ref name="TRAP_LOG"/>
</handlers>
</logger>
-->
<!-- Reduce org.mc4j stuff in the logs -->
<logger category="org.mc4j">
<level name="WARN"/>
</logger>
<!-- Clustering logging -->
<!-- Uncomment the following to redirect the org.jgroups and
org.jboss.ha categories to a cluster.log file.
<size-rotating-file-handler
file-name="${jboss.server.log.dir}/cluster.log"
name="CLUSTER"
append="false"
rotate-size="500k"
max-backup-index="5"
autoflush="true">
<error-manager>
<only-once/>
</error-manager>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] %m%n"/>
</formatter>
</size-rotating-file-handler>
<logger category="org.jgroups">
<level name="DEBUG" />
<handlers>
<handler-ref name="CLUSTER"/>
</handlers>
</logger>
<logger category="org.jboss.ha">
<level name="DEBUG" />
<handlers>
<handler-ref name="CLUSTER"/>
</handlers>
</logger>
-->
<!-- This is a temporary workaround for https://jira.jboss.org/jira/browse/EMBJOPR-280 and
should be removed once that bug if fixed in the bundled admin-console war. -->
<logger category="org.rhq.plugins.jbossas5.ApplicationServerComponent">
<level name="FATAL"/>
</logger>
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root-logger>
<!-- Set the root logger priority via a system property, with a default value. -->
<level name="${jboss.server.log.threshold:INFO}"/>
<handlers>
<handler-ref name="CONSOLE"/>
<handler-ref name="FILE"/>
</handlers>
</root-logger>
</logging>
and this is logging.properties
# Additional logger names to configure (root logger is always configured)
#loggers=org.jboss.whatever,org.jboss.foo
loggers=org.jboss.system.server.ServerInfo
# Root logger level
logger.level=${jboss.boot.server.log.level:INFO}
# Root logger handlers
logger.handlers=CONSOLE, FILE
# Allow debug logging from ServerInfo to get the system properties dump
logger.org.jboss.system.server.ServerInfo.level=${jboss.boot.server.log.serverinfo.level:DEBUG}
# Console handler configuration
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
handler.CONSOLE.properties=autoFlush
handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO}
handler.CONSOLE.autoFlush=true
handler.CONSOLE.formatter=PATTERN
# Boot log file handler configuration
handler.FILE=org.jboss.logmanager.handlers.FileHandler
handler.FILE.level=${jboss.boot.server.log.file.level:DEBUG}
handler.FILE.properties=autoFlush,fileName
handler.FILE.autoFlush=true
handler.FILE.fileName=${jboss.boot.server.log.dir}/boot.log
handler.FILE.formatter=PATTERN
# Formatter pattern configuration
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
formatter.PATTERN.properties=pattern
formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c{1}] %s%E%n
How can I control the size of boot.log file
Anyone facing same.... thanks...!
In logging.properties change your handler.FILE=org.jboss.logmanager.handlers.FileHandler
to handler.FILE=org.jboss.logmanager.handlers.SizeRotatingFileHandler
I am trying to separate the logs by application. standalone.xml come with a pre-configured log for console and file. I created a file-handler for my application and the respective logger. But the logs are being logged in my application.log and the server.log.
I confirmed that my webapp does not contain the log4j.jar
Can anyone let me know how to prevent the log4j to log for the server.log and only log to the respective application log file?
Thank you very much!
-- Web application server: Wildfly 9.0.1
-- standalone.xml code
<subsystem xmlns="urn:jboss:domain:logging:3.0">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<periodic-rotating-file-handler name="SECVALFILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="securityvalidation.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<logger category="com.oracle.securityvalidation">
<level name="DEBUG"/>
<handlers>
<handler name="SECVALFILE"/>
</handlers>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
......
I already found the issue.
By default, the parent logger will process any message. we can use the logger attribute "use-parent-handlers" to specify if whether or not the message should be processed by the parent logger
Thank you so much anyway!
<logger category="com.oracle.securityvalidation" use-parent-handlers="false">
<level name="DEBUG"/>
<handlers>
<handler name="SECVALFILE"/>
</handlers>
Quiet new to log4net appender.
I have created a new log4net appender which I would like to get called only if the level is Warn or Fatal or Error.
I tried below but doesn't seem to be working i.e. it gets called for Info as well.
<root>
<priority value="ERROR" />
<appender-ref ref="MyBrandNewAppender" />
</root>
Also what's the difference between above and below:
<logger name="bla" additivity="false">
<level value="ERROR" />
<appender-ref ref="MyBrandNewAppender" />
</logger>
Thanks
In the root tag you are using priority.
<priority value="ERROR" />
I am using level which works for me.
<level value="ERROR" />
I am trying to enable logging of incoming HTTP headers on my server which uses Axis2, is there a way to do it via log4j?
Axis2 uses Apache Commons Logging, a pluggable logging API. Now the question is: which logging library does your server use? If it's log4j, then you probably can make it log the Axis2 traffic — try setting
log4j.logger.org.apache.axis2.transport.http.server.wire=DEBUG
in the log4j.properties file of the application server.
If your server uses other lib, however, redirecting axis output to log4j may involve playing with classloaders as described in Commons Logging FAQ — so that Commons Logging and Log4j are loaded by the same classloader, you'll need to deploy both libraries with your EAR and reverse classloading policy to "parent last". Chances are other libraries from your application won't run with this setting.
I know it is old post, but I would like to share my solution to help other as I just faced the same case recently. I have configured the following in log4j.xml
<appender name="fileout" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="/soapLog/axis2.log" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%p] %m%n" />
</layout>
</appender>
<logger name="org.apache.axis2.enterprise">
<level value="debug" />
<appender-ref ref="fileout" />
</logger>
<logger name="de.hunsicker.jalopy.io">
<level value="debug" />
<appender-ref ref="fileout" />
</logger>
<logger name="httpclient.wire">
<level value="debug" />
<appender-ref ref="fileout" />
</logger>
<logger name="org.apache.commons.httpclient">
<level value="debug" />
<appender-ref ref="fileout" />
</logger>
<logger name="org.apache.axis2.transport.http.server.wire">
<level value="debug" />
<appender-ref ref="fileout" />
</logger>
Hope this may help.
I am getting duplicate lines in my log output with the following web.config entries:
<root>
<priority value="Off"/>
<appender-ref ref="FileAppender"/>
</root>
<logger name="SessionMgr">
<priority value="ALL" />
<appender-ref ref="FileAppender" />
</logger>
If I take the element out I get nothing, as I expect. But, adding the element results in ever line duplicated.
What am I not understanding?
I would try this instead:
<root>
<priority value="Off"/>
<appender-ref ref="FileAppender"/>
</root>
<logger name="SessionMgr">
<priority value="ALL" />
</logger>
Your root logger already tells you to log to FileAppender. You shouldn't need to add it in your SessionMgr logger. You can also see this article for more details:
Eliminate duplicate logging in log4net