[logback-dev] [JIRA] (LOGBACK-1483) Headers are getting added during every application startup while configuring programmatically
QOS.CH (JIRA)
noreply-jira at qos.ch
Sat Aug 31 14:00:00 CEST 2019
Sai Srikar Mutya created LOGBACK-1483:
-----------------------------------------
Summary: Headers are getting added during every application startup while configuring programmatically
Key: LOGBACK-1483
URL: https://jira.qos.ch/browse/LOGBACK-1483
Project: logback
Issue Type: Bug
Components: logback-core
Affects Versions: 1.2.3
Reporter: Sai Srikar Mutya
Assignee: Logback dev list
Priority: Critical
Use case :
Application has to write events into a ".tmp" file and there is a time based rolling policy which rotates log file for every minute.
Also, there is a header which needs to be appended for every log file. So I have used `
PatternLayoutEncoderBase` class to set headers and pattern.
Problem: If I am restarting my application during the same minute, Headers are getting appended multiple times.
So we need an option to not append the header if they are already present.
I have also tried an option where we check the file during application startup, but there is a scenario where the application starts during a minute and the events are getting logged in the next minute.
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
More information about the logback-dev
mailing list