You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Mikael Ståldal (JIRA)" <ji...@apache.org> on 2017/06/23 10:13:00 UTC

[jira] [Commented] (LOG4J2-1952) log4j doesn't find log4j2.yaml

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

Mikael Ståldal commented on LOG4J2-1952:
----------------------------------------

YAML configuration (as well as JSON configuration) requires some extra runtime dependencies, see [http://logging.apache.org/log4j/2.x/runtime-dependencies.html]. Try adding those and see if it helps.

> log4j doesn't find log4j2.yaml
> ------------------------------
>
>                 Key: LOG4J2-1952
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1952
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.8.2
>            Reporter: Todd Sewell
>
> A repository demonstrating the issue: https://github.com/flaghacker/Log4jTest
> I added a file called log4j2.yaml in the resources folder, so it should be on the classpath. Building an actual jar does confirm this.
> When running this project (gradlew run) I get the following warning:
> {{ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.}}
> If I enable TRACE logging, one of the lines shows lo4j2 did indeed try looking for the file:
> {{TRACE StatusLogger Trying to find [log4j2.yaml] using context class loader sun.misc.Launcher$AppClassLoader@18b4aac2.}}
> Did I make a mistake somewhere? Or is this an actual bug?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)