[jboss-jira] [JBoss JIRA] (JBLOGGING-104) MDC Logging not appearing in server.log

ArunPrasath Rajmohan (JIRA) issues at jboss.org
Thu May 29 01:13:15 EDT 2014


ArunPrasath Rajmohan created JBLOGGING-104:
----------------------------------------------

             Summary: MDC Logging not appearing in server.log
                 Key: JBLOGGING-104
                 URL: https://issues.jboss.org/browse/JBLOGGING-104
             Project: JBoss Logging
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: jboss-logging-logmanager, jboss-logging-spi
    Affects Versions: 3.1.4.GA
         Environment: Local
            Reporter: ArunPrasath Rajmohan
            Assignee: James Perkins


Hi 

I am trying to log using org.jboss.logging.MDC but the log entry is not found in server.log

Steps followed:

1.Maven Dependency Used:

<dependency>
			<groupId>org.jboss.logging</groupId>
			<artifactId>jboss-logging</artifactId>
			<version>3.1.4.GA</version>
</dependency>

2.Athe below code in the controller
org.jboss.logging.MDC.put("MDC Worked", new String("MDC Worked"));

3.Placed the jboss-logging.xml inside META-INF folder of the web application.
The content of  jboss-logging.xml  is as follows:

<periodic-rotating-file-handler  
         file-name="${jboss.server.log.dir}/server.log"  
         name="FILE"  
         autoflush="true"  
         append="true"  
         suffix=".yyyy-MM-dd">  
  
      <error-manager>  
         <only-once/>  
      </error-manager>  
  
       <formatter>  
         <pattern-formatter pattern="%d %-5p [%c] (%t) [%X{entry1}, %X{entry2}] %s%E%n"/>  
      </formatter>  
   </periodic-rotating-file-handler> 

Problem:

There are no errors but the log entry is not found in the server.log

Regards
Arun
    	





--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list