Closed pavledragisic closed 1 month ago
Check the documentation. The times parameter controls log rotation.
To specify a local time for the timestamp written to the logfile, use the %L
format specifier or the times
property of the PatternFormatter
.
/// Using the "times" property it is possible to specify
/// time mode for the day/time based rotation. The following values
/// for the "times" property are supported:
///
/// * utc: Rotation strategy is based on UTC time (default).
/// * local: Rotation strategy is based on local time.
In fact, the FileChannel
has no control over how the timestamp gets written. This is the business of the formatter.
Describe the bug Logging file channel logs using UTC time even though it is configured to use local time by setting
logging.channels.file.times = local
. For console channel it is not possible to specifytimes
parameter.To Reproduce Add this configuration and compare times in logs with actual time.
Expected behavior When
logging.channels.file.times = local
is configured, timestamps in log file should be using local time. Alsotimes
parameter should be supported in console channel. Currently workaround this issue is to usePatternFormatter
. Example configuration: