Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
I can’t really answer that. I personally don’t use Eclipse or cradle.

FWIW, we were advised by the Java module team to put module-info.java where it 
is for the reasons you stated.

Ralph

> On Jun 25, 2018, at 12:40 PM, Sverre Moe  wrote:
> 
> Disregard my final question. Did some research and found out why. It
> is for backward compatibility. And it is actually implied with your
> latest sentence also,  “earlier versions of Java will ignore it”.
> 
> Is there a method to get this working with Eclipse and the gradle javadoc 
> task?
> Den man. 25. jun. 2018 kl. 21:21 skrev Sverre Moe :
>> 
>> Running Java 10
>> Eclipse cannot find the module.
>> 
>> module no.djviking.movies {
>>requires org.apache.logging.log4j;
>> }
>> 
>> Eclipse: org.apache.logging.log4j cannot be resolved to a module
>> 
>> Running Eclipse 4.7.3 also on Java 10.
>> 
>> However building with Gradle works having the module-info in that place.
>> I had to write the logging code without any Eclipse IDE support.
>> 
>> However gradle javadoc fails finding the module.
>>> Task :javadoc FAILED
>> /home/djviking/workspace/movies/src/main/java/module-info.java:15:
>> error: module not found: org.apache.logging.log4j
>> 
>> javadoc {
>>inputs.property("moduleName", moduleName)
>>doFirst {
>>options.addStringOption('-module-path', classpath.asPath)
>>}
>> }
>> 
>> 
>> Why putting it in classes/META-INF/versions/9 ? That approach was
>> unknown to me. Most modules I have seen have it on the same place as
>> the package root.
>> 
>> 
>> Den man. 25. jun. 2018 kl. 20:49 skrev Ralph Goers 
>> :
>>> 
>>> I should have said “earlier versions of Java will ignore it”.
>>> 
>>> Ralph
>>> 
 On Jun 25, 2018, at 11:44 AM, Ralph Goers  
 wrote:
 
 The module-info.java file is in classes/META-INF/versions/9. Java 9+ will 
 find it there. Other versions of Java will ignore it.
 
 If you want to look at the source look in 
 https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD
  
 
 
 Ralph
 
> On Jun 25, 2018, at 11:26 AM, Sverre Moe  wrote:
> 
> The only module name that comes up in Eclipse is
> org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
> modulepath.
> 
>  compile group: 'org.apache.logging.log4j', name: 'log4j-api',
> version: '2.11.0'
>  compile group: 'org.apache.logging.log4j', name: 'log4j-core',
> version: '2.11.0'
>  compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'
> 
> The Log4j-api.jar does not contain a module-info.class
> https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
> j-api-2.11.0.jar
> 
> There is no module-info.java in the Log4j source code
> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD
> 
> Should I create a JIRA report for this?
> Or is it something I need to do to make this work?
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
 
>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
Disregard my final question. Did some research and found out why. It
is for backward compatibility. And it is actually implied with your
latest sentence also,  “earlier versions of Java will ignore it”.

Is there a method to get this working with Eclipse and the gradle javadoc task?
Den man. 25. jun. 2018 kl. 21:21 skrev Sverre Moe :
>
> Running Java 10
> Eclipse cannot find the module.
>
> module no.djviking.movies {
> requires org.apache.logging.log4j;
> }
>
> Eclipse: org.apache.logging.log4j cannot be resolved to a module
>
> Running Eclipse 4.7.3 also on Java 10.
>
> However building with Gradle works having the module-info in that place.
> I had to write the logging code without any Eclipse IDE support.
>
> However gradle javadoc fails finding the module.
> > Task :javadoc FAILED
> /home/djviking/workspace/movies/src/main/java/module-info.java:15:
> error: module not found: org.apache.logging.log4j
>
> javadoc {
> inputs.property("moduleName", moduleName)
> doFirst {
> options.addStringOption('-module-path', classpath.asPath)
> }
> }
>
>
> Why putting it in classes/META-INF/versions/9 ? That approach was
> unknown to me. Most modules I have seen have it on the same place as
> the package root.
>
>
> Den man. 25. jun. 2018 kl. 20:49 skrev Ralph Goers 
> :
> >
> > I should have said “earlier versions of Java will ignore it”.
> >
> > Ralph
> >
> > > On Jun 25, 2018, at 11:44 AM, Ralph Goers  
> > > wrote:
> > >
> > > The module-info.java file is in classes/META-INF/versions/9. Java 9+ will 
> > > find it there. Other versions of Java will ignore it.
> > >
> > > If you want to look at the source look in 
> > > https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD
> > >  
> > > 
> > >
> > > Ralph
> > >
> > >> On Jun 25, 2018, at 11:26 AM, Sverre Moe  wrote:
> > >>
> > >> The only module name that comes up in Eclipse is
> > >> org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
> > >> modulepath.
> > >>
> > >>   compile group: 'org.apache.logging.log4j', name: 'log4j-api',
> > >> version: '2.11.0'
> > >>   compile group: 'org.apache.logging.log4j', name: 'log4j-core',
> > >> version: '2.11.0'
> > >>   compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'
> > >>
> > >> The Log4j-api.jar does not contain a module-info.class
> > >> https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
> > >> j-api-2.11.0.jar
> > >>
> > >> There is no module-info.java in the Log4j source code
> > >> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD
> > >>
> > >> Should I create a JIRA report for this?
> > >> Or is it something I need to do to make this work?
> > >>
> > >> -
> > >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> > >>
> > >>
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
Running Java 10
Eclipse cannot find the module.

module no.djviking.movies {
requires org.apache.logging.log4j;
}

Eclipse: org.apache.logging.log4j cannot be resolved to a module

Running Eclipse 4.7.3 also on Java 10.

However building with Gradle works having the module-info in that place.
I had to write the logging code without any Eclipse IDE support.

However gradle javadoc fails finding the module.
> Task :javadoc FAILED
/home/djviking/workspace/movies/src/main/java/module-info.java:15:
error: module not found: org.apache.logging.log4j

javadoc {
inputs.property("moduleName", moduleName)
doFirst {
options.addStringOption('-module-path', classpath.asPath)
}
}


Why putting it in classes/META-INF/versions/9 ? That approach was
unknown to me. Most modules I have seen have it on the same place as
the package root.


Den man. 25. jun. 2018 kl. 20:49 skrev Ralph Goers :
>
> I should have said “earlier versions of Java will ignore it”.
>
> Ralph
>
> > On Jun 25, 2018, at 11:44 AM, Ralph Goers  
> > wrote:
> >
> > The module-info.java file is in classes/META-INF/versions/9. Java 9+ will 
> > find it there. Other versions of Java will ignore it.
> >
> > If you want to look at the source look in 
> > https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD
> >  
> > 
> >
> > Ralph
> >
> >> On Jun 25, 2018, at 11:26 AM, Sverre Moe  wrote:
> >>
> >> The only module name that comes up in Eclipse is
> >> org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
> >> modulepath.
> >>
> >>   compile group: 'org.apache.logging.log4j', name: 'log4j-api',
> >> version: '2.11.0'
> >>   compile group: 'org.apache.logging.log4j', name: 'log4j-core',
> >> version: '2.11.0'
> >>   compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'
> >>
> >> The Log4j-api.jar does not contain a module-info.class
> >> https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
> >> j-api-2.11.0.jar
> >>
> >> There is no module-info.java in the Log4j source code
> >> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD
> >>
> >> Should I create a JIRA report for this?
> >> Or is it something I need to do to make this work?
> >>
> >> -
> >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >>
> >>
> >
>
>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
I should have said “earlier versions of Java will ignore it”.

Ralph

> On Jun 25, 2018, at 11:44 AM, Ralph Goers  wrote:
> 
> The module-info.java file is in classes/META-INF/versions/9. Java 9+ will 
> find it there. Other versions of Java will ignore it.
> 
> If you want to look at the source look in 
> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api-java9/src/main/java/module-info.java;h=3cb22e02da6fba1475f01d8c17df28d2f89a570d;hb=HEAD
>  
> 
> 
> Ralph
> 
>> On Jun 25, 2018, at 11:26 AM, Sverre Moe  wrote:
>> 
>> The only module name that comes up in Eclipse is
>> org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
>> modulepath.
>> 
>>   compile group: 'org.apache.logging.log4j', name: 'log4j-api',
>> version: '2.11.0'
>>   compile group: 'org.apache.logging.log4j', name: 'log4j-core',
>> version: '2.11.0'
>>   compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'
>> 
>> The Log4j-api.jar does not contain a module-info.class
>> https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
>> j-api-2.11.0.jar
>> 
>> There is no module-info.java in the Log4j source code
>> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD
>> 
>> Should I create a JIRA report for this?
>> Or is it something I need to do to make this work?
>> 
>> -
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> 
> 



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Sverre Moe
The only module name that comes up in Eclipse is
org.apache.logging.log4j.core, wirh both log4j-api and log4j-core on
modulepath.

compile group: 'org.apache.logging.log4j', name: 'log4j-api',
version: '2.11.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-core',
version: '2.11.0'
compile group: 'com.lmax', name: 'disruptor', version:'3.3.7'

The Log4j-api.jar does not contain a module-info.class
https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4
j-api-2.11.0.jar

There is no module-info.java in the Log4j source code
https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=tree;f=log4j-api/src/main/java;h=be0121aff811ff39007e3f89cb05e489326971f0;hb=HEAD

Should I create a JIRA report for this?
Or is it something I need to do to make this work?

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
Log4j-API is not an automatic module. It has a module-info.java file.

Log4j-API does not “require” log4j-core. It’s module-info specification is

exports org.apache.logging.log4j;
exports org.apache.logging.log4j.message;
exports org.apache.logging.log4j.simple;
exports org.apache.logging.log4j.spi;
exports org.apache.logging.log4j.status;
exports org.apache.logging.log4j.util;

uses org.apache.logging.log4j.spi.Provider;
uses org.apache.logging.log4j.util.PropertySource;
uses org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory;

Log4j-core IS an automatic module with a name of org.apache.logging.log4j.core. 
It cannot be a “real” module because it has dependencies on libraries that have 
not declared themselves to be Java 9 modules, automatic or otherwise. 
Therefore, it cannot declare that it provides the three items log4j-api says it 
needs for an implementation to provide.

That said, we do have tests that pass and other users have pointed out problems 
in the module-info.java that, once fixed, seemed to have made things work for 
them.

Ralph


> On Jun 23, 2018, at 5:00 AM, Sverre Moe  wrote:
> 
> Apache Log4j may have a wrong Automatic-Module-Name
> requires org.apache.logging.log4j.core;
> 
> I cannot use the Logger and LogManager classes because they are not
> accessible to my module.
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> private Logger logger = LogManager.getLogger(this.getClass());
> 
> The type org.apache.logging.log4j.LogManager is not accessible
> The type org.apache.logging.log4j.Logger is not accessible
> 
>> "This is the central interface in the log4j package. Most logging 
>> operations, except configuration, are done through this interface. The 
>> canonical way to obtain a Logger for a class is through {@link 
>> LogManager#getLogger()}."
> 
> The Logger implementation is accessible:
> import org.apache.logging.log4j.core.Logger;
> 
> It seems to me that the classes in core package is not to be accessed
> directly by those using Log4j.
> 
> This leads me to believe no one has actually begun to use Log4j in a
> modular project. Because how can they when they cannot access the API.
> 
> The Automatic-Module-Name should be instead "org.apache.logging.log4j".
> If the classes under the core package should not be used then it
> should not be exported.
> Perhaps then the Automatic-Module-Name needs to be
> "org.apache.logging.log4j.api".
> 
> But this is just the automatic module name that log4j has set. What is
> actually exported is also wrong. The Export-Package in JAR MANIFEST.MF
> exports not the API, but the implementation.
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 



Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Matt Sicker
Can you add a JIRA report for this?

On Sun, 24 Jun 2018 at 17:52, Sverre Moe  wrote:

> Perhaps the problem is that log4j-api.jar does not have a
> Automatic-Module-Name in its MANIFEST.MF.
> Only the log4j-core.jar has this entry in its manifest file.
> Den lør. 23. jun. 2018 kl. 14:00 skrev Sverre Moe :
> >
> > Apache Log4j may have a wrong Automatic-Module-Name
> > requires org.apache.logging.log4j.core;
> >
> > I cannot use the Logger and LogManager classes because they are not
> > accessible to my module.
> >
> > import org.apache.logging.log4j.LogManager;
> > import org.apache.logging.log4j.Logger;
> > private Logger logger = LogManager.getLogger(this.getClass());
> >
> > The type org.apache.logging.log4j.LogManager is not accessible
> > The type org.apache.logging.log4j.Logger is not accessible
> >
> > > "This is the central interface in the log4j package. Most logging
> operations, except configuration, are done through this interface. The
> canonical way to obtain a Logger for a class is through {@link
> LogManager#getLogger()}."
> >
> > The Logger implementation is accessible:
> > import org.apache.logging.log4j.core.Logger;
> >
> > It seems to me that the classes in core package is not to be accessed
> > directly by those using Log4j.
> >
> > This leads me to believe no one has actually begun to use Log4j in a
> > modular project. Because how can they when they cannot access the API.
> >
> > The Automatic-Module-Name should be instead "org.apache.logging.log4j".
> > If the classes under the core package should not be used then it
> > should not be exported.
> > Perhaps then the Automatic-Module-Name needs to be
> > "org.apache.logging.log4j.api".
> >
> > But this is just the automatic module name that log4j has set. What is
> > actually exported is also wrong. The Export-Package in JAR MANIFEST.MF
> > exports not the API, but the implementation.
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

-- 
Matt Sicker 


Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-25 Thread Remko Popma
(Re-posting since I did not see the link when sending from my yahoo mail
account.)

Blogged:
https://blogs.apache.org/logging/entry/announce-apache-log4j-audit-1

Please share on social media!
Thanks, -Remko

On Mon, Jun 25, 2018 at 7:48 PM, Remko Popma 
wrote:

>  Blogged: [ANNOUNCE] Apache Log4j Audit 1.0.0 released : Apache Logging
> Services
>
> |
> |
> |  |
> [ANNOUNCE] Apache Log4j Audit 1.0.0 released : Apache Logging Services
>
>
>  |
>
>  |
>
>  |
>
>
>
> Please share on social media!
> Thanks,-Remko
> On Saturday, June 23, 2018, 1:31:26 AM GMT+9, Matt Sicker <
> boa...@gmail.com> wrote:
>
>  You could always wait until Monday to post it to get more views. :)
> On 22 June 2018 at 11:28, Remko Popma  wrote:
>
> I should be able to blog this announcement tomorrow morning but now it’s
> bedtime for me.
> :-)
>
> (Shameless plug) Every java main() method deserves http://picocli.info
>
> > On Jun 23, 2018, at 0:39, Ralph Goers 
> wrote:
> >
> > The Apache Log4j  team is pleased to announce the Apache Log4j Audit
> 1.0.0 release!
> >
> > Apache Log4j Audit provides a framework for defining audit events and
> then logging them using Log4j. The framework focuses on defining the events
> and providing an easy mechanism for applications to log them, allowing
> products to provide consistency and validity to the events that are logged.
> It does not focus on how the log events are written to a data store. Log4j
> itself provides many options for that.
> > Log4j Audit builds upon Log4j by defining its own AuditMessage. An
> AuditMessage is a container for structured data messages which allows a log
> message to be generated that contains a set of keys and values. The
> AuditMessage passes through Log4j as any other log event would.
> >
> >
> > For complete information on Apache Log4j 2, including instructions on
> how to submit bug reports, patches, or suggestions for improvement, see the
> Apache Apache Log4j 2 website:
> >
> > http://logging.apache.org/ log4j-audit/latest/
>
>
>
>
>
> --
> Matt Sicker 
>


Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-25 Thread Remko Popma
 Blogged: [ANNOUNCE] Apache Log4j Audit 1.0.0 released : Apache Logging Services

| 
| 
|  | 
[ANNOUNCE] Apache Log4j Audit 1.0.0 released : Apache Logging Services


 |

 |

 |



Please share on social media!
Thanks,-Remko
On Saturday, June 23, 2018, 1:31:26 AM GMT+9, Matt Sicker 
 wrote:  
 
 You could always wait until Monday to post it to get more views. :)
On 22 June 2018 at 11:28, Remko Popma  wrote:

I should be able to blog this announcement tomorrow morning but now it’s 
bedtime for me.
:-)

(Shameless plug) Every java main() method deserves http://picocli.info

> On Jun 23, 2018, at 0:39, Ralph Goers  wrote:
> 
> The Apache Log4j  team is pleased to announce the Apache Log4j Audit 1.0.0 
> release!
> 
> Apache Log4j Audit provides a framework for defining audit events and then 
> logging them using Log4j. The framework focuses on defining the events and 
> providing an easy mechanism for applications to log them, allowing products 
> to provide consistency and validity to the events that are logged. It does 
> not focus on how the log events are written to a data store. Log4j itself 
> provides many options for that.
> Log4j Audit builds upon Log4j by defining its own AuditMessage. An 
> AuditMessage is a container for structured data messages which allows a log 
> message to be generated that contains a set of keys and values. The 
> AuditMessage passes through Log4j as any other log event would.
> 
> 
> For complete information on Apache Log4j 2, including instructions on how to 
> submit bug reports, patches, or suggestions for improvement, see the Apache 
> Apache Log4j 2 website:
> 
> http://logging.apache.org/ log4j-audit/latest/





-- 
Matt Sicker   

A second configuration is loaded and overwrites mine

2018-06-25 Thread Alexander Magnusson
Hello!

Setup:
Embedded tomcat 8.5.31
Log4j2 api/core/web 2.11.0
Disruptor 3.3.6

>From my understanding by running in a web context scenario (my problem is
in an embedded Tomcat 8.5.31) the log4j2.xml file needs only to be put into
the web/WEB-INF/ folder for it to be read and the rest of the configuration
should happen as normal. I've got this working perfectly fine in another
web application project, but I can't get this to work properly.

By setting the debug flag I can see that the file is read and correctly
parsed but after that there seems to be a different logger (probably the
default one?) that gets configured and overwrites my included config, thus
only printing ERROR level. If i point the configurationFile flag to the
file it only loads my file and it works perfectly, so I'm guessing I am
missing something, but what?

In the status trace I find both:
DEBUG StatusLogger LoggerContext[name=/dk,
org.apache.logging.log4j.core.LoggerContext@4212f9a6] started OK with
configuration
XmlConfiguration[location=/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml].
and a few lines after that it seems to restart the configuration process:

DEBUG StatusLogger Starting LoggerContext[name=18b4aac2,
org.apache.logging.log4j.core.LoggerContext@4834368c]...
DEBUG StatusLogger Reconfiguration started for context[name=18b4aac2] at
URI null (org.apache.logging.log4j.core.LoggerContext@4834368c) with
optional ClassLoader: null


My log4j2.xml:


http://www.w3.org/2001/XInclude;>



















true










The whole startup trace:

Connected to the target VM, address: '127.0.0.1:38561', transport: 'socket'
Starting Apache Tomcat/8.5.31
 starting [/dk] from [/home/alexanderm/workspace/project_name/web/]
 starting [/static] from [/home/alexanderm/workspace/project_name/static/]
DEBUG StatusLogger Log4jServletContainerInitializer starting up Log4j in
Servlet 3.0+ environment.
DEBUG StatusLogger Using ShutdownCallbackRegistry class
org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry
DEBUG StatusLogger Using the servlet context name "null".
DEBUG StatusLogger Using the servlet context context-path "/dk".
DEBUG StatusLogger getConfigURI found resource paths [/WEB-INF/log4j2.xml]
in servletContext at [/WEB-INF/]
DEBUG StatusLogger getConfigURI found resource
[file:/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml] in
servletContext at [/WEB-INF/log4j2.xml]
DEBUG StatusLogger Took 0.067673 seconds to load 207 plugins from
ParallelWebappClassLoader
  context: dk
  delegate: true
--> Parent Classloader:
sun.misc.Launcher$AppClassLoader@18b4aac2

DEBUG StatusLogger PluginManager 'Converter' found 44 plugins
DEBUG StatusLogger Starting OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger PluginManager 'ConfigurationFactory' found 4 plugins
DEBUG StatusLogger Missing dependencies for Yaml support,
ConfigurationFactory
org.apache.logging.log4j.core.config.yaml.YamlConfigurationFactory is
inactive
DEBUG StatusLogger Using configurationFactory
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory@42630297
[Warning] log4j2.xml:14:40: Include operation failed, reverting to
fallback. Resource error reading file as XML (href='test-appenders.xml').
Reason:
/home/alexanderm/workspace/project_name/web/WEB-INF/test-appenders.xml (No
such file or directory)
[Warning] log4j2.xml:27:38: Include operation failed, reverting to
fallback. Resource error reading file as XML (href='test-loggers.xml').
Reason:
/home/alexanderm/workspace/project_name/web/WEB-INF/test-loggers.xml (No
such file or directory)
DEBUG StatusLogger Watching file
'/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml' for
lastModified Thu Jun 21 14:06:26 CEST 2018 (1529582786000)
DEBUG StatusLogger Starting LoggerContext[name=/dk] from configuration at
file:/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml
DEBUG StatusLogger Starting LoggerContext[name=/dk,
org.apache.logging.log4j.core.LoggerContext@4212f9a6] with configuration
XmlConfiguration[location=/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml]...
DEBUG StatusLogger Shutdown hook enabled. Registering a new one.
DEBUG StatusLogger Initializing configuration
XmlConfiguration[location=/home/alexanderm/workspace/project_name/web/WEB-INF/log4j2.xml]
DEBUG StatusLogger Installed 2 script engines
DEBUG StatusLogger Oracle Nashorn version: 1.8.0_171, language: ECMAScript,
threading: Not Thread Safe, compile: true, names: [nashorn, Nashorn, js,
JS, JavaScript, javascript, ECMAScript, ecmascript], factory class:
jdk.nashorn.api.scripting.NashornScriptEngineFactory
DEBUG StatusLogger Caucho Quercus Script Engine version: 4.0.46, language:
php, threading: THREAD-ISOLATED, compile: true, names: [quercus,