[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using non-existent appender in root - no logging in other files #831

Open
rogsal opened this issue Jul 10, 2024 · 1 comment
Open

Using non-existent appender in root - no logging in other files #831

rogsal opened this issue Jul 10, 2024 · 1 comment

Comments

@rogsal
Copy link
rogsal commented Jul 10, 2024

I am using slf4j and logback version 1.3.14 and removed an appended, but failed to remove the corresponding from the element. Logback was started, and no error was thrown. For all other appenders in the -element the log files were created, but the log files are empty.

<root level="INFO">
        <appender-ref ref="DEFAULT-FILE"/>
        <appender-ref ref="SECURITY-FILE"/>
        <appender-ref ref="NON-EXISTENT-FILE"/>
</root>

I know that this is a configuration issue. It would be good if an error or a warning message is thrown if an appender-ref is used for a non-existent appended.

Thanks

The corresponding log:

09:56:31,925 |-INFO in ReconfigureOnChangeTask(born:1720597561917) - Detected change in configuration files.
09:56:31,925 |-INFO in ReconfigureOnChangeTask(born:1720597561917) - Will reset and reconfigure context named [default]
09:56:31,925 |-INFO in ReconfigureOnChangeTask(born:1720597561917) - Detected change in configuration files.
09:56:31,925 |-INFO in ReconfigureOnChangeTask(born:1720597561917) - Will reset and reconfigure context named [default]
09:56:31,949 |-INFO in ch.qos.logback.classic.model.processor.ConfigurationModelHandlerFull - Registering a new ReconfigureOnChangeTask ReconfigureOnChangeTask(born:1720598191949)
09:56:31,949 |-INFO in ch.qos.logback.classic.model.processor.ConfigurationModelHandlerFull - Will scan for changes in [file:/D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/conf/logback.xml]
09:56:31,950 |-INFO in ch.qos.logback.classic.model.processor.ConfigurationModelHandlerFull - Setting ReconfigureOnChangeTask scanning period to 30 seconds
09:56:31,950 |-INFO in ch.qos.logback.core.model.processor.TimestampModelHandler - Using current interpretation time, i.e. now, as time reference.
09:56:31,950 |-INFO in ch.qos.logback.core.model.processor.TimestampModelHandler - Adding property to the context with key="date" and value="2024-07-10" to the LOCAL scope
09:56:31,950 |-INFO in ch.qos.logback.core.model.processor.TimestampModelHandler - Using current interpretation time, i.e. now, as time reference.
09:56:31,951 |-INFO in ch.qos.logback.core.model.processor.TimestampModelHandler - Adding property to the context with key="week" and value="2024-28" to the LOCAL scope
09:56:31,952 |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE] not referenced. Skipping further processing.
09:56:31,953 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [DEFAULT-FILE]
09:56:31,953 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:56:31,954 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:56:31,955 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@219260245 - Will use zip compression
09:56:31,955 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@219260245 - Will use the pattern D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/application_%d{yyyy-MM-dd}.log for the active file
09:56:31,956 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/application_%d{yyyy-MM-dd}.log.zip'.
09:56:31,956 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
09:56:31,957 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2024-07-10T07:56:31.956Z
09:56:31,957 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[DEFAULT-FILE] - Active log file name: D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/application.log
09:56:31,957 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[DEFAULT-FILE] - File property is set to [D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/application.log]
09:56:31,958 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [HL7-FILE]
09:56:31,958 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:56:31,958 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:56:31,961 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1935873558 - Will use zip compression
09:56:31,962 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1935873558 - Will use the pattern D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/hl7_%d{yyyy-MM-dd}.log for the active file
09:56:31,962 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/hl7_%d{yyyy-MM-dd}.log.zip'.
09:56:31,962 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
09:56:31,962 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2024-07-10T07:56:31.962Z
09:56:31,963 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[HL7-FILE] - Active log file name: D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/hl7.log
09:56:31,963 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[HL7-FILE] - File property is set to [D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/hl7.log]
09:56:31,965 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [SECURITY-FILE]
09:56:31,965 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:56:31,965 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:56:31,966 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@976381625 - Will use zip compression
09:56:31,966 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@976381625 - Will use the pattern D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/security_%d{yyyy-MM-dd}.log for the active file
09:56:31,967 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/security_%d{yyyy-MM-dd}.log.zip'.
09:56:31,967 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
09:56:31,967 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2024-07-10T07:56:31.967Z
09:56:31,968 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SECURITY-FILE] - Active log file name: D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/security.log
09:56:31,968 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SECURITY-FILE] - File property is set to [D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/security.log]
09:56:31,975 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [LOGBACK-FILE]
09:56:31,976 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:56:31,977 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:56:31,981 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1550705233 - Will use zip compression
09:56:31,981 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1550705233 - Will use the pattern D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/logback_%d{yyyy-ww}.log for the active file
09:56:31,982 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-ww' from file name pattern 'D:/GlucoTab-Test/glucotab-tomcat-9.1-RC1/logs/archive/logback_%d{yyyy-ww}.log.zip'.
09:56:31,982 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Rollover at the start of week.
09:56:31,982 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2024-07-10T07:16:01.915Z
09:56:31,983 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[LOGBACK-FILE] - Active log file name: D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/logback.log
09:56:31,983 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[LOGBACK-FILE] - File property is set to [D:\GlucoTab-Test\glucotab-tomcat-9.1-RC1/logs/logback.log]
09:56:31,983 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [at.glucotab] to DEBUG
09:56:31,983 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [at.glucotab.service.config.ConfigurationCoreService] to WARN
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [at.glucotab.cxf.interceptor] to DEBUG
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [at.glucotab.hl7] to DEBUG
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting additivity of logger [at.glucotab.hl7] to false
09:56:31,984 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [HL7-FILE] to Logger[at.glucotab.hl7]
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [at.glucotab.hl7.rawMessage] to TRACE
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting additivity of logger [at.glucotab.hl7.rawMessage] to false
09:56:31,984 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [HL7-FILE] to Logger[at.glucotab.hl7.rawMessage]
09:56:31,984 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [ch.qos] to DEBUG
09:56:31,985 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting additivity of logger [ch.qos] to false
09:56:31,985 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [LOGBACK-FILE] to Logger[ch.qos]
09:56:31,985 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@8e9ff5b - End of configuration.
09:56:31,985 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2224b57d - Registering current configuration as safe fallback point

@ceki
Copy link
Member
ceki commented Jul 10, 2024

@rogsal That is quite unexpected. Created LOGBACK-1771 for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants