Skip to content

Treat empty log config refresh interval as infinite interval in Log4jWebConfigurer [SPR-11507] #16132

@spring-projects-issues

Description

@spring-projects-issues

Dmitry Katsubo opened SPR-11507 and commented

Currently if log4jRefreshInterval is empty, Log4jWebConfigurer throws an exception because the value is not a number. Consider the following scenario when value is substituted by Maven (resource filtering = true):

<context-param>
	<param-name>log4jRefreshInterval</param-name>
	<param-value>${log4j.refresh.interval}</param-value>
</context-param>

If log4j.refresh.interval is empty, application does not start. The solution is either to set log4j.refresh.interval to big value like 9999999, or do some fuzzy things in Maven POM to juggle two different web.xml files.

Suggestion:

Log4jWebConfigurer should treat empty refresh interval as not-defined.


Affects: 3.2.8, 4.0.1

Attachments:

Backported to: 3.2.9

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions