[logback-user] Are included files scanned

jaybytez jaybytez at yahoo.com
Fri Feb 11 04:48:27 CET 2011


Thanks so much for your help...if I can ask you one more question.

1) I upgraded to logback 0.9.28 and I am using slf4j 1.6.1
2) I put my <included> files into a folder in my WebLogic Domain that is in
the server classpath:
<included>
  
  	<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d [%thread] %level %logger - %m%n</pattern>
		</encoder>
	</appender>
  
  <logger name="org.apache.cxf" level="info" additivity="false">
    <appender-ref ref="CodeLookupUtilityService" />
  </logger>
  
  <logger name="org.hibernate" level="info" additivity="false">
    <appender-ref ref="CodeLookupUtilityService" />
  </logger>
  
  <logger name="org.quartz" level="info" additivity="false">
    <appender-ref ref="CodeLookupUtilityService" />
  </logger>
  
  <logger name="org.springframework" level="info" additivity="false">
    <appender-ref ref="CodeLookupUtilityService" />
  </logger>

  <root level="info">
    <appender-ref ref="stdout" />
    <appender-ref ref="CodeLookupUtilityService"/>
  </root>
</included>
3) I put a logback file into the war file that includes this file on the
server classpath:
<configuration scan="true" scanPeriod="5 seconds">

  <appender name="CodeLookupUtilityService"
class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>./logs/services/CodeLookupUtilityService.log</file>
    <append>true</append>
    <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- daily rollover -->
     
<fileNamePattern>./logs/services/CodeLookupUtilityService%d{yyyy-MM-dd}.log</fileNamePattern>
      
      <!-- keep 30 days worth of history -->
      <maxHistory>10</maxHistory> 
    </rollingPolicy>
    <encoder>
      <pattern>%d [%thread] %level %logger - %m%n</pattern>
    </encoder>
  </appender>

  <include resource="CodeLookupUtilityService-logback.xml"/>
  
</configuration>
4) In weblogic's managed server startup script I include parameters for
logback and cxf (to use slf4j) in the java options:
-Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Slf4jLogger
-Dlogback.statusListenerClass=ch.qos.logback.core.status.OnConsoleStatusListener

The logging occurs and the war logback.xml is able to include the file on
the weblogic classpath.  But if I modify the weblogic classpath log file,
then the war does not seem to autoscan and pick it up.  Any thoughts or
recommendations....Here is my console:

Thanks...jay

<Feb 10, 2011 7:31:09 PM PST> <Info> <Management> <BEA-141107> <Version:
WebLogi
c Server 10.3.4.0  Fri Dec 17 20:47:33 PST 2010 1384255 >
<Feb 10, 2011 7:31:11 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to STARTING>
<Feb 10, 2011 7:31:11 PM PST> <Info> <WorkManager> <BEA-002900>
<Initializing se
lf-tuning thread pool>
<Feb 10, 2011 7:31:11 PM PST> <Notice> <LoggingService> <BEA-320400> <The
log fi
le
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\fsscDomain\servers\fs
scMgdServer1\logs\fsscMgdServer1.log will be rotated. Reopen the log file if
tai
ling has stopped. This can happen on some platforms like Windows.>
<Feb 10, 2011 7:31:11 PM PST> <Notice> <LoggingService> <BEA-320401> <The
log fi
le has been rotated to
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\f
sscDomain\servers\fsscMgdServer1\logs\fsscMgdServer1.log00060. Log messages
will
 continue to be logged in
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domain
s\fsscDomain\servers\fsscMgdServer1\logs\fsscMgdServer1.log.>
<Feb 10, 2011 7:31:11 PM PST> <Notice> <Log Management> <BEA-170019> <The
server
 log file
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\fsscDomain\ser
vers\fsscMgdServer1\logs\fsscMgdServer1.log is opened. All server side log
event
s will be written to this file.>
<Feb 10, 2011 7:31:14 PM PST> <Notice> <Security> <BEA-090082> <Security
initial
izing using security realm myrealm.>
<Feb 10, 2011 7:31:15 PM PST> <Notice> <LoggingService> <BEA-320400> <The
log fi
le
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\fsscDomain\servers\fs
scMgdServer1\logs\access.log will be rotated. Reopen the log file if tailing
has
 stopped. This can happen on some platforms like Windows.>
<Feb 10, 2011 7:31:15 PM PST> <Notice> <LoggingService> <BEA-320401> <The
log fi
le has been rotated to
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\f
sscDomain\servers\fsscMgdServer1\logs\access.log00020. Log messages will
continu
e to be logged in
C:\NotBackedUp\tools\wls_10.3.4.0\user_projects\domains\fsscDo
main\servers\fsscMgdServer1\logs\access.log.>
<Feb 10, 2011 7:31:16 PM PST> <Warning> <HTTP> <BEA-101296> <Unable to load
the
default compiler class "com.sun.tools.javac.Main". Using the default javac
compi
ler to compile JSPs.>
<Feb 10, 2011 7:31:16 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to STANDBY>
<Feb 10, 2011 7:31:16 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to STARTING>
<Feb 10, 2011 7:31:23 PM PST> <Notice> <Log Management> <BEA-170027> <The
Server
 has established connection with the Domain level Diagnostic Service
successfull
y.>
<Feb 10, 2011 7:31:23 PM PST> <Notice> <Cluster> <BEA-000197> <Listening for
ann
ouncements from cluster using unicast cluster messaging>
<Feb 10, 2011 7:31:23 PM PST> <Notice> <Cluster> <BEA-000133> <Waiting to
synchr
onize with other running members of fsscCluster.>
<Feb 10, 2011 7:31:53 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to ADMIN>
<Feb 10, 2011 7:31:53 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to RESUMING>
<Feb 10, 2011 7:31:53 PM PST> <Notice> <Cluster> <BEA-000162> <Starting
"async"
replication service with remote cluster address
"localhost:8150,localhost:8250">

<Feb 10, 2011 7:31:53 PM PST> <Notice> <Server> <BEA-002613> <Channel
"Default[1
]" is now listening on 192.168.1.8:8150 for protocols iiop, t3,
CLUSTER-BROADCAS
T, ldap, snmp, http.>
<Feb 10, 2011 7:31:53 PM PST> <Warning> <Server> <BEA-002611> <Hostname
"foo.com
">
<Feb 10, 2011 7:31:53 PM PST> <Notice> <Server> <BEA-002613> <Channel
"Default"
is now listening on 167.238.248.157:8150 for protocols iiop, t3,
CLUSTER-BROADCA
ST, ldap, snmp, http.>
<Feb 10, 2011 7:31:53 PM PST> <Notice> <Server> <BEA-002613> <Channel
"Default[2
]" is now listening on 127.0.0.1:8150 for protocols iiop, t3,
CLUSTER-BROADCAST,
 ldap, snmp, http.>
<Feb 10, 2011 7:31:53 PM PST> <Notice> <WebLogicServer> <BEA-000332>
<Started We
bLogic Managed Server "fsscMgdServer1" for domain "fsscDomain" running in
Develo
pment Mode>
<Feb 10, 2011 7:31:55 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server
sta
te changed to RUNNING>
<Feb 10, 2011 7:31:55 PM PST> <Notice> <WebLogicServer> <BEA-000360> <Server
sta
rted in RUNNING mode>
<Feb 10, 2011 7:36:18 PM PST> <Warning> <J2EE> <BEA-160140> <Unresolved
optional
 package references (in META-INF/MANIFEST.MF): [Extension-Name: envProps,
Specif
ication-Version: 1, Implementation-Version: 1.0.0.1, referenced from:
C:\NotBack
edUp\tools\wls_10.3.4.0\user_projects\domains\fsscDomain\servers\fsscMgdServer1\
tmp\_WL_user\code-lookup-svc-war\asht5f\war]. Make sure the referenced
optional
package has been deployed as a library.>
19:36:18,664 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could
NOT
 find resource [logback.groovy]
19:36:18,664 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could
NOT
 find resource [logback-test.xml]
19:36:18,664 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found
res
ource [logback.xml] at
[zip:C:/NotBackedUp/tools/wls_10.3.4.0/user_projects/doma
ins/fsscDomain/servers/fsscMgdServer1/tmp/_WL_user/code-lookup-svc-war/asht5f/wa
r/WEB-INF/lib/_wl_cls_gen.jar!/logback.xml]
19:36:18,680 |-ERROR in
ch.qos.logback.core.joran.spi.ConfigurationWatchList at 4f0
187 - URL
[zip:C:/NotBackedUp/tools/wls_10.3.4.0/user_projects/domains/fsscDomai
n/servers/fsscMgdServer1/tmp/_WL_user/code-lookup-svc-war/asht5f/war/WEB-INF/lib
/_wl_cls_gen.jar!/logback.xml] is not of type file
19:36:18,789 |-INFO in
ch.qos.logback.classic.joran.action.ConfigurationAction -
 debug attribute not set
19:36:18,804 |-INFO in
ch.qos.logback.classic.joran.action.ConfigurationAction -
 Setting ReconfigureOnChangeFilter scanning period to 5 seconds
19:36:18,804 |-INFO in
ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter at ed
4b5a - Will scan for changes in [[]] every 5 seconds.
19:36:18,804 |-INFO in
ch.qos.logback.classic.joran.action.ConfigurationAction -
 Adding ReconfigureOnChangeFilter as a turbo filter
19:36:18,804 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
About t
o instantiate appender of type
[ch.qos.logback.core.rolling.RollingFileAppender]

19:36:18,804 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
Naming
appender as [CodeLookupUtilityService]
19:36:18,929 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No
compressio
n will be used
19:36:18,929 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use
the
pattern ./logs/services/CodeLookupUtilityService%d{yyyy-MM-dd}.log for the
activ
e file
19:36:18,945 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggerin
gPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern
'./logs/servic
es/CodeLookupUtilityService%d{yyyy-MM-dd}.log'.
19:36:18,945 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggerin
gPolicy - Roll-over at midnight.
19:36:18,945 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggerin
gPolicy - Setting initial period to Thu Feb 10 19:36:18 PST 2011
19:36:18,945 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA
- Assuming default type
[ch.qos.logback.classic.encoder.PatternLayoutEncoder] fo
r [encoder] property
19:36:19,023 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[CodeLooku
pUtilityService] - Active log file name:
./logs/services/CodeLookupUtilityServic
e.log
19:36:19,023 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[CodeLooku
pUtilityService] - File property is set to
[./logs/services/CodeLookupUtilitySer
vice.log]
19:36:19,023 |-INFO in
ch.qos.logback.core.joran.util.ConfigurationWatchListUtil
@ee271d - Adding
[file:/C:/NotBackedUp/tools/wls_10.3.4.0/user_projects/domains/
fsscDomain/logging/CodeLookupUtilityService-logback.xml] to configuration
watch
list.
19:36:19,039 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
About t
o instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
19:36:19,039 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
Naming
appender as [stdout]
19:36:19,039 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA
- Assuming default type
[ch.qos.logback.classic.encoder.PatternLayoutEncoder] fo
r [encoder] property
19:36:19,039 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g level of logger [org.apache.cxf] to WARN
19:36:19,039 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g additivity of logger [org.apache.cxf] to false
19:36:19,039 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [CodeLookupUtilityService] to Logger[org.apache.cxf]
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g level of logger [org.hibernate] to WARN
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g additivity of logger [org.hibernate] to false
19:36:19,054 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [CodeLookupUtilityService] to Logger[org.hibernate]
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g level of logger [org.quartz] to WARN
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g additivity of logger [org.quartz] to false
19:36:19,054 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [CodeLookupUtilityService] to Logger[org.quartz]
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g level of logger [org.springframework] to WARN
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction -
Settin
g additivity of logger [org.springframework] to false
19:36:19,054 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [CodeLookupUtilityService] to
Logger[org.springframework]
19:36:19,054 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction
- Se
tting level of ROOT logger to INFO
19:36:19,054 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [stdout] to Logger[ROOT]
19:36:19,054 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction -
Atta
ching appender named [CodeLookupUtilityService] to Logger[ROOT]


-- 
View this message in context: http://old.nabble.com/Are-included-files-scanned-tp28347902p30898393.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list