Description
Hello, now that I'm able to set a custom default for logging.pattern.console
i noticed that the documentation of the default value seems to be slightly incorrect.
By Default Log messages look like this:
2024-08-19T15:17:36.200+02:00 INFO 7876 --- [ restartedMain] d.c.operations.rest.RestServiceApp : Starting RestServiceApp using Java 21.0.4 with PID 7876 (D:\playground\event-test\target\classes started by user in D:\playground\event-test)
2024-08-19T15:17:36.202+02:00 INFO 7876 --- [ restartedMain] d.c.operations.rest.RestServiceApp : No active profile set, falling back to 1 default profile: "default"
The documentation says about logging.pattern.console
:
Appender pattern for output to the console. Supported only with the default Logback setup.
Default: %clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd'T'HH:mm:ss. SSSXXX}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}
But ff I copy paste this value set this as the default the log looks like this:
-2024-08-19T15:51:14. 008+02:00 - INFO 17532 --- [ restartedMain] d.c.operations.rest.RestServiceApp : Starting RestServiceApp using Java 21.0.4 with PID 17532 (D:\playground\event-test\target\classes started by v108745 in D:\playground\event-test)
--2024-08-19T15:51:14. 010+02:00 - INFO 17532 --- [ restartedMain] d.c.operations.rest.RestServiceApp : No active profile set, falling back to 1 default profile: "default"
I after some tests I think this is the correct default:
%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}
this will produce the same log as if there is not custom config.