Skip to content

Load log4j.xml file #2186

Answered by ppkarwasz
riwarek asked this question in Q&A
Jan 12, 2024 · 4 comments · 11 replies
Discussion options

You must be logged in to vote

If you call the configuration file log4j2.xml and place it on the classpath, it will be automatically detected.

Otherwise you need to use a system property:

  • for 2.x the property is log4j2.configurationFile,
  • for 3.x the property is log4j2.*.Configuration.file,
  • [the one you set, log4j.configuration, was used in Log4j 1.x].

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by riwarek
Comment options

You must be logged in to vote
3 replies
@vy
Comment options

vy Jan 12, 2024
Collaborator

@riwarek
Comment options

@ppkarwasz
Comment options

Comment options

You must be logged in to vote
6 replies
@riwarek
Comment options

@ppkarwasz
Comment options

@riwarek
Comment options

@riwarek
Comment options

@ppkarwasz
Comment options

Comment options

You must be logged in to vote
2 replies
@ppkarwasz
Comment options

@riwarek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants