Hi,
We  are using logback 1.1.2 in our j2ee web application . For each device we 
want  to  generate separate log files .We are using siftingappender
With file appender .Please find the enclosed logback.xml
   But a peculiar error is happenging.After writing to its  own thread file(  
say for device 123456 its 123456-2014-05-21T12-51-32.log)..it is failing over 
to default
Discriminator .i.e main and wrting.
  We have placed <statusListener 
class="ch.qos.logback.core.status.OnConsoleStatusListener" />   and 
<configuration debug="true">  but  stil getting anu hints of
What exactly is going wrong
I  am also including server startup logs
Please provide a solution

Thanks,
Shirsangshu



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com
<configuration debug="true">
   <property name="MY_HOME" value="C:\logtest" />
<!--    <property name="MY_HOME" value="/home/at-mobility/logtest" /> -->
<!--     <property name="MY_HOME" 
value="/mobileCommunication/Monet/Prod/applog" />  -->
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />

  <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
<!--    <discriminator class="package.to.LoggerNameBasedDiscriminator"/> -->
       <!-- in the absence of the class attribute, it is assumed that the
         desired discriminator type is
         ch.qos.logback.classic.sift.MDCBasedDiscriminator -->
     <discriminator> 
      <key>logfilename</key>
      <defaultValue>main</defaultValue>
    </discriminator> 
    <sift>
      <appender name="FILE-${logfilename}" 
class="ch.qos.logback.core.FileAppender">
        <file>${MY_HOME}/${logfilename}</file>
         <prudent>true</prudent> 

        <layout class="ch.qos.logback.classic.PatternLayout">
          <!--  <pattern>%d [%thread] %level %mdc %logger{35} - 
%msg%n</pattern> -->
          <encoder>
          <pattern>imei:%X{user} %contextName %d{MM-dd-yyyy HH:mm:ss}  - 
%msg%n</pattern>
          </encoder>
        </layout>
      </appender>
    </sift>
  </appender>
  <!-- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> 
    encoders are assigned the type 
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default 
    <encoder> 
      <logger name="chapters.configuration.Foo" level="DEBUG" /> 
          <pattern>imei:%X{user} %d{MM-dd-yyyy HH:mm:ss} %logger{35} - %msg 
%n</pattern> 
    </encoder> 
  </appender>  -->
 <logger name="org.springframework" level="WARN"/>
  <root level="DEBUG">
    <appender-ref ref="SIFT" />
<!--     <appender-ref ref="STDOUT" /> -->
     </root>
</configuration>
May 21, 2014 12:51:20 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
C:\Program 
Files\Java\jdk1.6.0_38\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program
 Files (x86)\PC Connectivity 
Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;;C:\Program
 Files\Java\jdk1.6.0_38\bin;C:\Program Files\Java\jdk1.6.0_38\lib;C:\Program 
Files\Java\jre7\bin;E:\apache-ant-1.8.2\bin;C:\Program 
Files\TortoiseSVN\bin;E:\softwares\android development 
set\adt-bundle-windows-x86-20130917\sdk\platform-tools;E:\softwares\android 
development set\adt-bundle-windows-x86-20130917\sdk\tools;C:\Program Files 
(x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL 
Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL 
Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL 
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL 
Server\100\DTS\Binn\;.
May 21, 2014 12:51:20 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'source' to 'org.eclipse.jst.jee.server:deviceSYNC' did not find a 
matching property.
May 21, 2014 12:51:20 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 21, 2014 12:51:20 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 21, 2014 12:51:20 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1028 ms
May 21, 2014 12:51:20 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 21, 2014 12:51:20 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52
May 21, 2014 12:51:21 PM org.apache.tomcat.websocket.server.WsSci onStartup
INFO: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when 
running on Java 6. To suppress this message, run Tomcat on Java 7, remove the 
WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the 
tomcat.util.scan.DefaultJarScanner.jarsToSkip property in 
$CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 
WebSocket API will be available. 
May 21, 2014 12:51:24 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
May 21, 2014 12:51:24 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = 
[C:\Users\sh284899\Documents\workspace-sts-3.5.1.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\deviceSYNC\]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/C:/Users/sh284899/Documents/workspace-sts-3.5.1.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/deviceSYNC/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/C:/Users/sh284899/Documents/workspace-sts-3.5.1.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/deviceSYNC/WEB-INF/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
12:51:24,752 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could 
NOT find resource [logback.groovy]
12:51:24,752 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could 
NOT find resource [logback-test.xml]
12:51:24,753 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found 
resource [logback.xml] at 
[file:/C:/Users/sh284899/Documents/workspace-sts-3.5.1.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/deviceSYNC/WEB-INF/classes/logback.xml]
12:51:24,867 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - 
Added status listener of type 
[ch.qos.logback.core.status.OnConsoleStatusListener]
12:51:24,752 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could 
NOT find resource [logback.groovy]
12:51:24,752 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could 
NOT find resource [logback-test.xml]
12:51:24,753 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found 
resource [logback.xml] at 
[file:/C:/Users/sh284899/Documents/workspace-sts-3.5.1.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/deviceSYNC/WEB-INF/classes/logback.xml]
12:51:24,867 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - 
Added status listener of type 
[ch.qos.logback.core.status.OnConsoleStatusListener]
12:51:24,868 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.classic.sift.SiftingAppender]
12:51:24,868 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.classic.sift.SiftingAppender]
12:51:24,877 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [SIFT]
12:51:24,877 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [SIFT]
12:51:24,911 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA 
- Assuming default type [ch.qos.logback.classic.sift.MDCBasedDiscriminator] for 
[discriminator] property
12:51:24,911 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA 
- Assuming default type [ch.qos.logback.classic.sift.MDCBasedDiscriminator] for 
[discriminator] property
12:51:24,928 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - 
Setting level of logger [org.springframework] to WARN
12:51:24,928 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - 
Setting level of logger [org.springframework] to WARN
12:51:24,928 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - 
Setting level of ROOT logger to DEBUG
12:51:24,928 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - 
Setting level of ROOT logger to DEBUG
12:51:24,928 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - 
Attaching appender named [SIFT] to Logger[ROOT]
12:51:24,928 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - 
Attaching appender named [SIFT] to Logger[ROOT]
12:51:24,929 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction 
- End of configuration.
12:51:24,929 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction 
- End of configuration.
12:51:24,931 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2c8fcc7b 
- Registering current configuration as safe fallback point
12:51:24,931 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2c8fcc7b 
- Registering current configuration as safe fallback point
May 21, 2014 12:51:24 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from 
[C:\Users\sh284899\Documents\workspace-sts-3.5.1.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\deviceSYNC\WEB-INF\log4j.properties]
***ServletContextListener started***
May 21, 2014 12:51:26 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'SpringController'
12:51:28,248 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.core.FileAppender]
12:51:28,248 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.core.FileAppender]
12:51:28,255 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [FILE-main]
12:51:28,255 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [FILE-main]
12:51:28,300 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@23:20 - no 
applicable action for [encoder], current ElementPath  is 
[[configuration][appender][layout][encoder]]
12:51:28,300 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@23:20 - no 
applicable action for [encoder], current ElementPath  is 
[[configuration][appender][layout][encoder]]
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - This 
appender no longer admits a layout as a sub-component, set an encoder instead.
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - This 
appender no longer admits a layout as a sub-component, set an encoder instead.
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - To ensure 
compatibility, wrapping your layout in LayoutWrappingEncoder.
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - To ensure 
compatibility, wrapping your layout in LayoutWrappingEncoder.
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - See also 
http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
12:51:28,312 |-WARN in ch.qos.logback.core.FileAppender[FILE-main] - See also 
http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
12:51:28,312 |-INFO in ch.qos.logback.core.FileAppender[FILE-main] - File 
property is set to [C:logtest/main]
12:51:28,312 |-INFO in ch.qos.logback.core.FileAppender[FILE-main] - File 
property is set to [C:logtest/main]
in afterPropertiesSet Environment FILE_SERVER_BASE_PATH D:\IRIFileServer
in afterPropertiesSet Environment TASKDOWNLOAD_PATH D:\IRIFileServer\dataout\
in afterPropertiesSet Environment TASKUPLOAD_PATH D:\IRIFileServer\datain\
in afterPropertiesSet Environment DATADICTIONARYFULLDOWNLOAD_PATH 
D:\IRIFileServer\datawait\
in afterPropertiesSet Environment DATADICTIONARYDELTADOWNLOAD_PATH 
D:\IRIFileServer\dataout\
in afterPropertiesSet Environment HELPFILESDOWNLOAD_PATH 
D:\IRIFileServer\helpfiles\
in afterPropertiesSet Environment TASKDOWNLOAD_ZIPFILE_NAME taskdownload
in afterPropertiesSet Environment HELPFILES_ZIPFILE_NAME : helpfiles
in afterPropertiesSet Environment DATADICTIONARYFULLDOWNLOAD_ZIPFILE_NAME : 
datadictionary_full
in afterPropertiesSet Environment DATADICTIONARYDELTADOWNLOAD_ZIPFILE_NAME : 
datadictionary_delta
in afterPropertiesSet Environment FILESERVER_IP_ADDRESS : 10.156.179.81
in afterPropertiesSet Environment SESSION_TIMEOUT : 29
in afterPropertiesSet Environment EMAIL_NOTIFICATION_FROM 
[email protected]
in afterPropertiesSet Environment EMAIL_NOTIFICATION_TO null
in afterPropertiesSet Environment EMAIL_NOTIFICATION_CC null
in afterPropertiesSet Environment EMAIL_NOTIFICATION_BCC null
in afterPropertiesSet Environment EMAIL_NOTIFICATION_TO4 attachment
in afterPropertiesSet Environment EMAIL_NOTIFICATION_ATTACHMENT attachment
in afterPropertiesSet Environment EMAIL_SENTBIT8_VALUE null
in afterPropertiesSet Environment EMAIL_PRIORITY_VALUE null
in afterPropertiesSet Environment EMAIL_CREATEDDATE_VALUE null
in afterPropertiesSet Environment EMAIL_CREATEDBY_VALUE null
in afterPropertiesSet Environment TASKS_DBDOWNLOAD_PATH 
D:\IRIFileServer\dataout\db\
12:51:28,452 DEBUG PropertyHolder:69 - All properties are loaded
May 21, 2014 12:51:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 21, 2014 12:51:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 21, 2014 12:51:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8460 ms
logFileName is  :123456-2014-05-21T12-51-32.log
12:51:32,536 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.core.FileAppender]
12:51:32,536 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About 
to instantiate appender of type [ch.qos.logback.core.FileAppender]
12:51:32,536 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [FILE-123456-2014-05-21T12-51-32.log]
12:51:32,536 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming 
appender as [FILE-123456-2014-05-21T12-51-32.log]
12:51:32,537 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@23:20 - no 
applicable action for [encoder], current ElementPath  is 
[[configuration][appender][layout][encoder]]
12:51:32,537 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@23:20 - no 
applicable action for [encoder], current ElementPath  is 
[[configuration][appender][layout][encoder]]
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - This 
appender no longer admits a layout as a sub-component, set an encoder instead.
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - This 
appender no longer admits a layout as a sub-component, set an encoder instead.
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - To 
ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - To 
ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - See 
also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
12:51:32,538 |-WARN in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - See 
also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
12:51:32,538 |-INFO in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - File 
property is set to [C:logtest/123456-2014-05-21T12-51-32.log]
12:51:32,538 |-INFO in 
ch.qos.logback.core.FileAppender[FILE-123456-2014-05-21T12-51-32.log] - File 
property is set to [C:logtest/123456-2014-05-21T12-51-32.log]
out parameter IN AUTHENTICATION STORED PROCEDURE true
logged in value istrue
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to