<?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/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:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20181"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20180"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20179"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20178"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20177"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20176"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20175"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20174"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20173"/>
      </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/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>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20180">
    <title>Re: Custom Syslog Format: Appending Exceptions?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20180</link>
    <description>&lt;pre&gt;I find this interesting...you had to go back a few levels to implement this
sort of custom behavior.  I'd love to see your patches, since I'm curious
if this can be incorporated into the SyslogAppender as opposed to going one
or two levels above it.

- Jason Black


On Tue, May 14, 2013 at 2:10 AM, Tomek Kaczynski
&amp;lt;tomek.kaczynski&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jason B</dc:creator>
    <dc:date>2013-05-14T19:48:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20179">
    <title>Burst Filter - Use to limit messages sent over a specific period?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20179</link>
    <description>&lt;pre&gt;I'm attempting to leverage a burst filter in my application.  I wish to log
errors and send e-mails any time we log an error.  The main thing is, I
don't want to send more than a few e-mails in a given time period (say, one
per event per fifteen minutes), to avoid overwhelming my inbox with these
error events.

Burst Filter seems appropriate for this role, but the documentation is
lacking.  For instance:

 - If I want a filter to accept only those events that happen after the
threshold, but "rest" for that fifteen minute period of time, how would I
accomplish this?  The configuration is less than intuitive here.

 - What is the role of &amp;lt;TimeBasedTriggeringPolicy /&amp;gt;? It's not mentioned
anywhere on the site, and only by digging in the source could I actually
determine what it's supposed to be doing.  It's also listed in every
example for filters on the site.

Thanks for clearing up any confusion.

- Jason Black
&lt;/pre&gt;</description>
    <dc:creator>Jason B</dc:creator>
    <dc:date>2013-05-14T19:47:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20178">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20178</link>
    <description>&lt;pre&gt;This worked!  (see below)  Thanks to all.

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ java -cp ".;./log4j-1.2.17.jar" Hello
0 [main] DEBUG Hello  - Hello world.
0 [main] INFO Hello  - What a beatiful day.

Mary


On Tue, May 14, 2013 at 9:06 AM, Jacob Kjome &amp;lt;hoju&amp;lt; at &amp;gt;visi.com&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Mary Laude</dc:creator>
    <dc:date>2013-05-14T17:52:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20177">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20177</link>
    <description>&lt;pre&gt;Whoops, I neglected one thing...

java -cp .;log4j-1.2-17.jar Hello


Notice I added the current directory to the classpath.  Change the classpath 
separator character to a colon if needed.


Jake

On Tue, 14 May 2013 09:00:57 -0700
 Mary Laude &amp;lt;marylaudecissp&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Jacob Kjome</dc:creator>
    <dc:date>2013-05-14T16:06:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20176">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20176</link>
    <description>&lt;pre&gt;Also, if it helps, I've got jdk1.7.0_21 installed for java stuff.
Mary


On Tue, May 14, 2013 at 9:00 AM, Mary Laude &amp;lt;marylaudecissp&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:



&lt;/pre&gt;</description>
    <dc:creator>Mary Laude</dc:creator>
    <dc:date>2013-05-14T16:03:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20175">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20175</link>
    <description>&lt;pre&gt;Assuming the package of Hello.class is the default package(so, no package)
the following should work:
$ java -cp .:./log4j-1.2.17.jar Hello



2013/5/14 Mary Laude &amp;lt;marylaudecissp&amp;lt; at &amp;gt;gmail.com&amp;gt;

&lt;/pre&gt;</description>
    <dc:creator>JOSE L MARTINEZ-AVIAL</dc:creator>
    <dc:date>2013-05-14T16:03:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20174">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20174</link>
    <description>&lt;pre&gt;Here is what I just did.  Note I am actually inside a Win VM, at a cygwin
prompt.

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ ls
build.properties.sample  INSTALL       log4j-1.2.17.jar              site
build.xml                JarDir.class  NOTICE                        src
contribs                 JarDir.java   NTEventLogAppender.amd64.dll  tests
examples                 KEYS          NTEventLogAppender.dll
Hello.java               LICENSE       pom.xml

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ echo $CLASSPATH
/home/Mary/apache-log4j-1.2.17/

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ javac -cp ./log4j-1.2.17.jar Hello.java

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ java -cp ./log4j-1.2.17.jar Hello
Error: Could not find or load main class Hello

Mary&amp;lt; at &amp;gt;WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17
$ ls
build.properties.sample  Hello.java    LICENSE                       pom.xml
build.xml                INSTALL       log4j-1.2&lt;/pre&gt;</description>
    <dc:creator>Mary Laude</dc:creator>
    <dc:date>2013-05-14T16:00:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20173">
    <title>Re: Need help: Steps in your INSTALL doc failing</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20173</link>
    <description>&lt;pre&gt;
No, Mary is just running an example from the install documentation.  And since 
the code is calling BasicConfigurator.configure(), there is no need for a 
config file in the classpath (though it is generally recommended to use a 
config file rather than configure via code).

Mary, please provide an example of your java command line when you run this.  
It should look something like...


java -cp log4j-1.2-17.jar Hello


Jake

On Tue, 14 May 2013 10:41:18 +0900
 Remko Popma &amp;lt;remkop&amp;lt; at &amp;gt;yahoo.com&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Jacob Kjome</dc:creator>
    <dc:date>2013-05-14T15:36:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20172">
    <title>Re: Custom Syslog Format: Appending Exceptions?</title>
    <link>http://permalink.gmane.org/gmane.comp.jakarta.log4j.user/20172</link>
    <description>&lt;pre&gt;Sure, I'll try in following days.


Tomek


On Tue, May 14, 2013 at 2:35 PM, Gary Gregory &amp;lt;garydgregory&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:

&lt;/pre&gt;</description>
    <dc:creator>Tomek Kaczynski</dc:creator>
    <dc:date>2013-05-14T15:23:46</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>
