Skip to content

Commit f660f8a

Browse files
author
zihluwang
committed
refactor: added logback configuration
1 parent 55a89f6 commit f660f8a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (C) 2024-2025 OnixByte.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
19+
<configuration>
20+
<property name="COLOURFUL_OUTPUT" value="%black(%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK}) %highlight(%-5level) %black(---) %black([%10.10t]) %cyan(%-20.20logger{20}) %black(:) %msg%n"/>
21+
<property name="STANDARD_OUTPUT" value="%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK} %-5level %black(---) [%10.10t] %-20.20logger{20} : %msg%n"/>
22+
23+
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
24+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
25+
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
26+
<pattern>${COLOURFUL_OUTPUT}</pattern>
27+
</encoder>
28+
</appender>
29+
<root level="INFO">
30+
<appender-ref ref="STDOUT"/>
31+
</root>
32+
</configuration>

0 commit comments

Comments
 (0)