1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | |
---|
3 | <!-- |
---|
4 | Logging Config File for IBIS-PH type applications (View and Admin). |
---|
5 | |
---|
6 | The basics consist of core logging (http://logback.qos.ch/manual/configuration.html) |
---|
7 | and appenders (http://logback.qos.ch/manual/appenders.html). See the full |
---|
8 | docs: http://logback.qos.ch/manual/index.html |
---|
9 | |
---|
10 | IBIS-PH defines (2) appenders by default; console and file. The logging |
---|
11 | configuration is defined for specific objects using the "logger" element |
---|
12 | with the default logging being defined within the "root" element. Valid |
---|
13 | logging levels in order of precedence are: TRACE, DEBUG, INFO, WARN, ERROR, |
---|
14 | ALL or OFF. The special case-insensitive value INHERITED, or its synonym |
---|
15 | NULL, will force the level of the logger to be inherited from higher up in |
---|
16 | the hierarchy. |
---|
17 | |
---|
18 | Prior to July, 2011, the logback logs were configured via the spring |
---|
19 | common.xml application context file. This was done so that the logback |
---|
20 | configuration file could be stored within the app without having to put the |
---|
21 | config file in the classpath or set a system wide property. In 2011, a |
---|
22 | custom context listener was added to the IBIS-PH code base that allows the |
---|
23 | logback configuration file to be specified. See the web.xml to set this |
---|
24 | file's path. Also, using the jcl-over-slf4j allows the spring JCL output |
---|
25 | to be captured and controlled via this file (see the org.springframework |
---|
26 | logger(s) defined below). |
---|
27 | |
---|
28 | There is NOT any site specific mechanism for this configuration file - |
---|
29 | if changes in logging are desired then this file will need to be modified |
---|
30 | and managed by the adopter. |
---|
31 | |
---|
32 | PROPERTIES NOTES: |
---|
33 | - The servletContextFilePath, appContextName, appContextPath, appDisplayName |
---|
34 | values are set via the ConfigureLogbackListener. |
---|
35 | --> |
---|
36 | |
---|
37 | <configuration> |
---|
38 | <!-- |
---|
39 | <property name="applicationName" value="${appContextName}"/> |
---|
40 | <contextName>${applicationName}</contextName> |
---|
41 | --> |
---|
42 | <!-- for ROOTcontext ie "/" context force contextName so that we get ibisph-view for log name Paul Leo 2/12/2015 --> |
---|
43 | <property name="applicationName" value="ibisph-view"/> |
---|
44 | <contextName>${applicationName}</contextName> |
---|
45 | |
---|
46 | <!-- Basic Layout used for appenders: |
---|
47 | Date Formats: |
---|
48 | yyyy Mon, dd, HH:mm:ss.sss |
---|
49 | yyyyMMddHHmmss |
---|
50 | |
---|
51 | Extra Info Params of Interest Available with the Logback Access package layouts: |
---|
52 | %remoteIP |
---|
53 | %protocol |
---|
54 | %header{header} |
---|
55 | %user |
---|
56 | %reqCookie{cookie} |
---|
57 | %reqParameter{paramName} |
---|
58 | %reqAttribute{attributeName} |
---|
59 | %requestMethod |
---|
60 | %requestURL |
---|
61 | %requestURI |
---|
62 | %requestContent |
---|
63 | %fullRequest |
---|
64 | |
---|
65 | %statusCode |
---|
66 | %byteSent |
---|
67 | %responseHeader{header} |
---|
68 | %responseContent |
---|
69 | %fullResponse |
---|
70 | --> |
---|
71 | <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> |
---|
72 | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
---|
73 | <pattern>%contextName %-5level %date{HH:mm:ss} %logger{25}%message%n</pattern> |
---|
74 | </encoder> |
---|
75 | </appender> |
---|
76 | |
---|
77 | <appender name="rollingFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
---|
78 | <File>${servletContextFilePath}/${applicationName}.log</File> |
---|
79 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
---|
80 | <FileNamePattern>${servletContextFilePath}/${applicationName}-%i.log</FileNamePattern> |
---|
81 | <MinIndex>1</MinIndex> |
---|
82 | <MaxIndex>2</MaxIndex> |
---|
83 | </rollingPolicy> |
---|
84 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
---|
85 | <MaxFileSize>100KB</MaxFileSize> |
---|
86 | </triggeringPolicy> |
---|
87 | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
---|
88 | <Pattern>%date{yyyy-MM-dd HH:mm:ss.sss} %-5level [%thread] %logger{36}%message%n</Pattern> |
---|
89 | </encoder> |
---|
90 | </appender> |
---|
91 | |
---|
92 | <logger name="org.springframework.security.access.vote.UnanimousBased" level="DEBUG"/> |
---|
93 | <logger name="org.springframework.security.access.vote.AffirmativeBased" level="DEBUG"/> |
---|
94 | <logger name="org.springframework.security.access.vote.RoleVoter" level="DEBUG"/> |
---|
95 | <logger name="org.ibisph.querymodule.modelmap.AddAuthorizedSelectedDimensions" level="DEBUG"/> |
---|
96 | <logger name="org.springframework.jndi.JndiObjectFactoryBean" level="DEBUG"/> |
---|
97 | |
---|
98 | <!-- Saxon 9.5+ has a false positive namespace warning: "The source document |
---|
99 | is in no namespace, but the template rules all expect elements in a |
---|
100 | namespace (Use - - suppressXsltNamespaceCheck:on to avoid this warning." |
---|
101 | This warning arises due to the ibis:include in the query module files that |
---|
102 | require an xmlns:ibis="http://www.ibisph.org" to work which have matching |
---|
103 | templates that use the ibis NS - so this is a false positive. The Logger |
---|
104 | is owned by the Transformation class NOT the listener class so have to set |
---|
105 | log level on the Transformer class NOT the LoggingTransformationErrorListener. |
---|
106 | --> |
---|
107 | <logger name="org.ibisph.xslt.Transformation" level="ERROR"/> |
---|
108 | |
---|
109 | <root> |
---|
110 | <level value="INFO"/> |
---|
111 | <appender-ref ref="consoleAppender"/> |
---|
112 | <appender-ref ref="rollingFileAppender"/> |
---|
113 | </root> |
---|
114 | </configuration> |
---|
115 | |
---|