<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user">
    <title>gmane.comp.jakarta.log4j.user</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20201"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20200"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20199"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20198"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20197"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20196"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20195"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20194"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20193"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20192"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20191"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20190"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20189"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20188"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20187"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20186"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20185"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20184"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20183"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20182"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20201">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20201</link>
    <description>&lt;pre&gt;Hi Nick,


Thanks a lot! From my (somewhat limited) understanding of the problem, this sounds exactly what I need to do, so this will be the next step that I'll attempt (might take some time, though).

With kind regards,
Piers


Am 23.05.2013 um 01:42 schrieb Nick Williams:

&lt;/pre&gt;</description>
    <dc:creator>Piers Uso Walter</dc:creator>
    <dc:date>2013-05-23T07:23:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20200">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20200</link>
    <description>&lt;pre&gt;Hi Brett,

this sounds like an interesting idea that's different from what I've tried so far. I'll see if I'll get that to work...

With kind regards,
Piers


Am 23.05.2013 um 01:31 schrieb Brett Randall:

&lt;/pre&gt;</description>
    <dc:creator>Piers Uso Walter</dc:creator>
    <dc:date>2013-05-23T07:21:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20199">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20199</link>
    <description>&lt;pre&gt;Hi Remko,

yes, I know :-)

The JBoss forums are full of questions like mine, but the JBoss community seems to have long moved on from JBoss 6, so I have not found any answers there. The way to integrate log4j seems to have changed from JBoss 6 to newer versions, so understandably it seems that no one working on or with JBoss 7 or 8 wants to take the time to research how that used to work back in JBoss 6.

I'll keep working on it off and on as my other tasks allow and will report back when I've got it to work.

With kind regards,
Piers


Am 23.05.2013 um 00:17 schrieb Remko Popma:

&lt;/pre&gt;</description>
    <dc:creator>Piers Uso Walter</dc:creator>
    <dc:date>2013-05-23T07:19:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20198">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20198</link>
    <description>&lt;pre&gt;Piers,

IIRC, JBoss 6, by default, prefers the parent class loaders over child class loaders. This means that, when a class path resource is referenced, it is first searched for in the server class loaders and _then_ in the web application class loader. This is similar to the default behavior in WebSphere and WebLogic, and counter to the default behavior in GlassFish and Tomcat (and even earlier versions of JBoss), which search for a resources _first_ in the web application class loader and _then_ in the server class loaders (IMO, the correct behavior).

The consequence of this is that the log4j.properties/log4j.xml file shipped with JBoss override the log4j.xml file shipped with your application.

The solution is to configure JBoss to disable parent-first class loading. The method by which you do this has changed from one JBoss version to another. Used to be a setting in /WEB-INF/jboss-web.xml, but it looks like it may have been moved. You should consult the JBoss documentation for instructions on disabling&lt;/pre&gt;</description>
    <dc:creator>Nick Williams</dc:creator>
    <dc:date>2013-05-22T23:42:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20197">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20197</link>
    <description>&lt;pre&gt;Piers,

I've not done this on JBoss 6.

If your application uses Spring Framework, you could initialize log4j using
their org.springframework.web.util.Log4jConfigListener as described in this
blog [1].

If you aren't using Spring, you can still take a similar approach - create
a ServletContextListener and use it to configure log4j with a file of your
choosing.  It sounds like you'll want something that's not on the
classpath, or at least is added to the classpath externally, or perhaps an
absolute or relative file path.

[1]
http://rocksolutions.wordpress.com/2011/06/12/log4j-configuration-in-spring-application/


On 20 May 2013 23:45, Piers Uso Walter &amp;lt;Piers.Walter&amp;lt; at &amp;gt;ilink.de&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Brett Randall</dc:creator>
    <dc:date>2013-05-22T23:31:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20196">
    <title>Re: how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20196</link>
    <description>&lt;pre&gt;Piers,

To be honest, this sounds more like a question that should be directed to the JBoss people...

Kind regards,
Remko

Sent from my iPhone

On 2013/05/20, at 22:45, Piers Uso Walter &amp;lt;Piers.Walter&amp;lt; at &amp;gt;ilink.de&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Remko Popma</dc:creator>
    <dc:date>2013-05-22T22:17:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20195">
    <title>how to configure log4j (1.2) in JBoss 6?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20195</link>
    <description>&lt;pre&gt;Hi,

I am migrating an application from JBoss 4 to JBoss 6 and stumble over the fact that log4j does not seem to be supported by JBoss 6 out of the box any more.

I've researched this quite extensively on the web, but have only found questions from other people, no answers. I hope someone in the log4j community has successfully used log4j (1.2) with JBoss 6 and might be able to help.


Our previous setup with a log4j.xml configuration file in server/default/conf/ no longer works. That configuration files does not seem to be detected and used by JBoss 6.
Basic logging (as configured in server/default/deploy/jboss-logging.xml) works, but I have not been successful in configuring log4j appenders in that file. From what I understand, this file does not really configure log4j, as JBoss 6 uses a new logging mechanism.
 
For example, I've modified jboss-logging.xml to use a log4j console appender and a log4j file appender instead of the standard appenders (see attached file). This did not work. The log file ${jboss&lt;/pre&gt;</description>
    <dc:creator>Piers Uso Walter</dc:creator>
    <dc:date>2013-05-20T13:45:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20194">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20194</link>
    <description>&lt;pre&gt;Yes, that is correct.  The getRootLogger method is not included in the Configuration interface.  I created a unit test to verify the code worked and I should have pasted the code from the test.

Ralph

On May 18, 2013, at 7:26 PM, Eric Scheie wrote:

&lt;/pre&gt;</description>
    <dc:creator>Ralph Goers</dc:creator>
    <dc:date>2013-05-19T06:06:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20193">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20193</link>
    <description>&lt;pre&gt;I should add that I didn't find the getRootLogger method in the API.  This
is the actual code I used.

  LoggerContext ctx = (LoggerContext) LogManager.getContext(false);

  Configuration config = ctx.getConfiguration();

  LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.
ROOT_LOGGER_NAME);

  loggerConfig.setLevel(level);

  ctx.updateLoggers();


Thanks,

-Eric


On Sat, May 18, 2013 at 9:13 AM, Nick Williams &amp;lt;
nicholas&amp;lt; at &amp;gt;nicholaswilliams.net&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eric Scheie</dc:creator>
    <dc:date>2013-05-19T02:26:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20192">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20192</link>
    <description>&lt;pre&gt;I agree, Scott.

On May 18, 2013, at 11:11 AM, Scott Deboy wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nick Williams</dc:creator>
    <dc:date>2013-05-18T16:13:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20191">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20191</link>
    <description>&lt;pre&gt;From looking at this, seems like config.getRootLoggerConfig() would be a
better name.
On May 17, 2013 10:40 PM, "Ralph Goers" &amp;lt;ralph.goers&amp;lt; at &amp;gt;dslextreme.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Scott Deboy</dc:creator>
    <dc:date>2013-05-18T16:11:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20190">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20190</link>
    <description>&lt;pre&gt;Thanks Ralph!  That was the code snippet I was looking for.  Works great!

Best,
-Eric


On Fri, May 17, 2013 at 10:39 PM, Ralph Goers &amp;lt;ralph.goers&amp;lt; at &amp;gt;dslextreme.com&amp;gt;wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eric Scheie</dc:creator>
    <dc:date>2013-05-18T16:03:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20189">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20189</link>
    <description>&lt;pre&gt;No, the X Logger does not inherit its level from the root Logger. It inherits its level from the root LoggerConfig.  See the picture at http://logging.apache.org/log4j/2.x/manual/architecture.html.

The level you are modifying is brought into each Logger so that the level can be tested very quickly.  That is why the note on the setLevel method says it is there primarily for unit testing. 

To do what you are attempting below you would need to do:

LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getRootLogger();
/* You could also specify the actual logger name as below and it will return the LoggerConfig used by the Logger.
    LoggerConfig loggerConfig = getLoggerConfig("X"); 
*/
loggerConfig.setLevel(Level.DEBUG);
ctx.updateLoggers();  // This causes all Loggers to refetch information from their LoggerConfig.

Ralph


On May 17, 2013, at 11:56 AM, Eric Scheie wrote:


&lt;/pre&gt;</description>
    <dc:creator>Ralph Goers</dc:creator>
    <dc:date>2013-05-18T05:39:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20188">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20188</link>
    <description>&lt;pre&gt;Here is a simple program that can reproduce my problem:


import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;


public class Main
{
    public static void main(String[] args)
    {
        Logger rootLogger =
LogManager.getLogger(LogManager.ROOT_LOGGER_NAME);
        Logger xLogger = LogManager.getLogger("X");

        xLogger.info("This is an INFO log message.");


((org.apache.logging.log4j.core.Logger)rootLogger).setLevel(Level.DEBUG);

        rootLogger.debug("This is a debug message from ROOT.");
        xLogger.debug("This is a debug message from X.");
    }

}


log4j-api-2.0-beta5.jar and log4j-core-2.0-beta4.jar are the only jars on
the class path.  I'm using the same log4j2.xml file as above.


When I run this program, I see the following output:


2013-05-17 11:50:54,192 INFO  [main] {} Main.main(14) - This is an INFO log
message.

2013-05-17 11:50:54,194 DEBUG [main] {} Main.main(18) - This is a debug
message from ROOT.


The&lt;/pre&gt;</description>
    <dc:creator>Eric Scheie</dc:creator>
    <dc:date>2013-05-17T18:56:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20187">
    <title>Re: Custom Syslog Format: Appending Exceptions?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20187</link>
    <description>&lt;pre&gt;Hi Gary,

   I've found some time to commit my syslogWrapLayout class, but I can't
push my change to the server because it prompts me for a user and password.
As far as I see this is different account from the JIRA one. Can you please
help me and send me a link with guidline saying how to commit something to
the project ?

Tomek


On Wed, May 15, 2013 at 1:03 PM, Tomek Kaczynski
&amp;lt;tomek.kaczynski&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:

&lt;/pre&gt;</description>
    <dc:creator>Tomek Kaczynski</dc:creator>
    <dc:date>2013-05-17T09:48:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20186">
    <title>Re: Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20186</link>
    <description>&lt;pre&gt;Can you provide a sample application that demonstrates this? 

Ralph

On May 16, 2013, at 9:44 PM, Eric Scheie wrote:

&lt;/pre&gt;</description>
    <dc:creator>Ralph Goers</dc:creator>
    <dc:date>2013-05-17T06:49:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20185">
    <title>Programmatically setting log4j2 log level</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20185</link>
    <description>&lt;pre&gt;I'm developing a web application and would like to be able to dynamically
change log levels from within my application instead of editing the log4j2
configuration file.   I'm using log4j 2.0 beta5.

I'm currently setting the log level after a form submit using:

((org.apache.logging.log4j.core.Logger) LogManager.getLogger(LogManager.
ROOT_LOGGER_NAME)).setLevel(Level.XXXXX);


And when I call:


((org.apache.logging.log4j.core.Logger) LogManager.getLogger(LogManager.
ROOT_LOGGER_NAME)).getLevel()


I get the level that I previously set as expected but I don't see the level
reflected in the logs.  For example, when changing the level to DEBUG on
the root logger I do not see debug messages written to the console.  If I
change the level of the root logger in my log4j2.xml configuration file I
do see the debug messages written to the console.


Here is my log4j2.xml file.


&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;configuration status="DEBUG" monitorInterval="10"&amp;gt;


    &amp;lt;appenders&amp;gt;

        &amp;lt;Console name="Consol&lt;/pre&gt;</description>
    <dc:creator>Eric Scheie</dc:creator>
    <dc:date>2013-05-17T04:44:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20184">
    <title>Re: Convient way to specify Log4J2 configuration outside of webapp?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20184</link>
    <description>&lt;pre&gt;No.  In that case see http://logging.apache.org/log4j/2.x/log4j-web/index.html and the Log4jContextListener.  https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/samples/flume-remote/ has a sample web app that writes to Flume and uses the Log4jContextListener to locate its configuration.

Ralph


On May 15, 2013, at 12:57 PM, Jason B wrote:


&lt;/pre&gt;</description>
    <dc:creator>Ralph Goers</dc:creator>
    <dc:date>2013-05-16T01:11:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20183">
    <title>Re: Convient way to specify Log4J2 configuration outside of webapp?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20183</link>
    <description>&lt;pre&gt;Ran into another interesting use case:

Suppose I have two applications that run in the same Tomcat instance.  If I
use the -Dlog4j.configurationFile property, would I be able to specify
individual log configurations for those applications?


On Mon, May 13, 2013 at 12:13 PM, Jason B &amp;lt;makotothedragon&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jason B</dc:creator>
    <dc:date>2013-05-15T19:57:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20182">
    <title>Re: Custom Syslog Format: Appending Exceptions?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20182</link>
    <description>&lt;pre&gt;Hi,
   The isssue is https://issues.apache.org/jira/browse/LOG4J2-256

    Whe should I put source and how ?
log4j2\core\src\main\java\org\apache\logging\log4j\core\layout is a good
location ?

Tomek



On Tue, May 14, 2013 at 9:48 PM, Jason B &amp;lt;makotothedragon&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Tomek Kaczynski</dc:creator>
    <dc:date>2013-05-15T11:03:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20181">
    <title>Re: Adding appenders programatically</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20181</link>
    <description>&lt;pre&gt;What is the recommended way of adding appenders in log4j 2.

In older version we were able to do
Logger.getLogger(theCategory).addAppender(appender).

Thanks!


On Tue, May 14, 2013 at 7:51 PM, Te Ta &amp;lt;ttashiuwyo&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Te Ta</dc:creator>
    <dc:date>2013-05-15T01:59:22</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.jakarta.log4j.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.jakarta.log4j.user</link>
  </textinput>
</rdf:RDF>
