[ 
https://issues.apache.org/jira/browse/LOG4J2-3181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435074#comment-17435074
 ] 

Ralph Goers commented on LOG4J2-3181:
-------------------------------------

I agree this is a problem. In my case I got errors loading the config via http 
and startup completely fails. 

> When custom configurationFile is missing then no fallback configuration is 
> used
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3181
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3181
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.13.0
>            Reporter: Krzysztof Gąsior
>            Priority: Major
>
> So I am using following setting to define 'external' logger configuration file
> {code:java}
> -Dlog4j.configurationFile=/etc/xxx/log4j2.properties
> {code}
> I also put a default config inside the package with assumption to use it as a 
> fallback, however if the 'external' configuration file does not exist 
> following occurs:
> {code:java}
> ERROR StatusLogger File not found in file system or classpath: 
> /etc/xxx/log4j2.properties
> ERROR StatusLogger Reconfiguration failed: No configuration found for 
> '27bc2616' at 'null' in 'null'{code}
> and as a result logger is not configured at all and not logging anything, 
> despite the fallback config is inside the package. There is a similar problem 
> described in following [SO 
> ticket|https://stackoverflow.com/questions/58338411/how-to-fall-back-to-log4j2-xml-when-custom-configurationfile-is-missing]
> In such situation I would expect log4j2 to follow the automatic configuration 
> path as defined here: 
> [https://logging.apache.org/log4j/2.x/manual/configuration.html]
>  and use properties from class path or if those not found to fallback to a 
> default settings. If not as a default behavior there at least should be way 
> to force it to work that way.
> Note that there is also a second issue, if define multiple configs via 
> configurationFile, even if single of those fails to be found then same issue 
> as above happens, and we get no configuration at all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to