|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2020 the original author or authors. |
| 2 | + * Copyright 2012-2021 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -72,11 +72,14 @@ private void defaults(LogbackConfigurator config) {
|
72 | 72 | + "%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) "
|
73 | 73 | + "%clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} "
|
74 | 74 | + "%clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"));
|
75 |
| - config.getContext().putProperty("CONSOLE_LOG_CHARSET", resolve(config, "${CONSOLE_LOG_CHARSET:-default}")); |
| 75 | + String defaultCharset = Charset.defaultCharset().name(); |
| 76 | + config.getContext().putProperty("CONSOLE_LOG_CHARSET", |
| 77 | + resolve(config, "${CONSOLE_LOG_CHARSET:-" + defaultCharset + "}")); |
76 | 78 | config.getContext().putProperty("FILE_LOG_PATTERN", resolve(config, "${FILE_LOG_PATTERN:-"
|
77 | 79 | + "%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] "
|
78 | 80 | + "%-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"));
|
79 |
| - config.getContext().putProperty("FILE_LOG_CHARSET", resolve(config, "${FILE_LOG_CHARSET:-default}")); |
| 81 | + config.getContext().putProperty("FILE_LOG_CHARSET", |
| 82 | + resolve(config, "${FILE_LOG_CHARSET:-" + defaultCharset + "}")); |
80 | 83 | config.logger("org.apache.catalina.startup.DigesterFactory", Level.ERROR);
|
81 | 84 | config.logger("org.apache.catalina.util.LifecycleBase", Level.ERROR);
|
82 | 85 | config.logger("org.apache.coyote.http11.Http11NioProtocol", Level.WARN);
|
|
0 commit comments