Skip to content

LOGBACK: No context given for c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy #21056

@bauline

Description

@bauline

when I try to use spring boot default configuration to configure a rolling log files,logback show tips like title,so I view source(v2.2.6.RELEASE) to find the reason. in 150 lines of DefaultLogbackConfiguration.java,

private void setRollingPolicy(RollingFileAppender<ILoggingEvent> appender, LogbackConfigurator config,
			String logFile) {
		SizeAndTimeBasedRollingPolicy<ILoggingEvent> rollingPolicy = new SizeAndTimeBasedRollingPolicy<>();
		...
		rollingPolicy.setTotalSizeCap(new FileSize(totalSizeCap.toBytes()));
		appender.setRollingPolicy(rollingPolicy);
		...
	}

when then rollingPolicy setRollingPolicy,logback show this tips,the tips info in 74 line of ContextAwareBase.java,the problem is not serious but very vexed, please repair it as soon as possible,thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions