Skip to content

Commit 9315f98

Browse files
committed
usage: add timestamped stderr console logging
1 parent 36060f0 commit 9315f98

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

usage/conf/log4j-cloud_usage.xml.in

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ under the License.
2020
<Configuration monitorInterval="60">
2121
<Appenders>
2222

23-
<!-- ============================== -->
24-
<!-- Append messages to the console -->
25-
<!-- ============================== -->
23+
<!-- ============================== -->
24+
<!-- Append messages to the console -->
25+
<!-- ============================== -->
2626

27-
<Console name="CONSOLE" target="SYSTEM_OUT">
28-
<ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
29-
<PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
30-
</Console>
27+
<Console name="CONSOLE" target="SYSTEM_OUT">
28+
<ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
29+
<PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
30+
</Console>
3131

32+
<Console name="CONSOLE_ERR" target="SYSTEM_ERR">
33+
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
34+
<PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
35+
</Console>
3236

33-
<!-- ================================ -->
34-
<!-- Append messages to the usage log -->
35-
<!-- ================================ -->
37+
<!-- ================================ -->
38+
<!-- Append messages to the usage log -->
39+
<!-- ================================ -->
3640

3741
<RollingFile name="USAGE" append="true" fileName="@USAGELOG@" filePattern="@USAGELOG@.%d{yyyy-MM-dd}{GMT}.gz">
3842
<ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
@@ -44,9 +48,9 @@ under the License.
4448
</Appenders>
4549

4650
<Loggers>
47-
<!-- ================ -->
48-
<!-- Limit categories -->
49-
<!-- ================ -->
51+
<!-- ================ -->
52+
<!-- Limit categories -->
53+
<!-- ================ -->
5054

5155
<Logger name="com.cloud" level="DEBUG"/>
5256

@@ -62,6 +66,7 @@ under the License.
6266

6367
<Root level="INFO">
6468
<AppenderRef ref="CONSOLE"/>
69+
<AppenderRef ref="CONSOLE_ERR"/>
6570
<AppenderRef ref="USAGE"/>
6671
</Root>
6772

0 commit comments

Comments
 (0)