Re: how to change logging level for a class at runtime

2014-06-23 Thread Ralph Goers
In looking at the JMX support it doesn’t look like the ability to do that was implemented. Perhaps you could create a Jira request for that enhancement? Ralph On Jun 23, 2014, at 7:55 AM, Ralph Goers ralph.go...@dslextreme.com wrote: Please see http://people.apache.org/~rgoers/log4j2/manual

Re: how to change logging level for a class at runtime

2014-06-24 Thread Ralph Goers
From: Ralph Goers ralph.go...@dslextreme.com To: Log4J Users List log4j-user@logging.apache.org, Date: 23/06/2014 15:57 Subject: Re: how to change logging level for a class at runtime Please see http://people.apache.org/~rgoers/log4j2/manual/customconfig.html

[ANNOUNCEMENT] Apache Log4j 2.0-rc2 released

2014-06-25 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.0-rc2 release! Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements

Re: Log4j2 Official Release

2014-07-10 Thread Ralph Goers
Nothing around here is cast in concrete. However, I personally have one more patch to apply and then I will propose doing the release. The release vote could come as soon as this weekend or it could be in a week or two. Ralph On Jul 10, 2014, at 2:17 AM, Mohammad Arouri

Re: Make LogEvent implementations Externalizable

2014-07-10 Thread Ralph Goers
I’d be afraid of breaking compatibility even now. However, I think what you really want to do is to create an ExternalizedLayout and then just use that instead of the default SerializedLayout. If you want to supply that Layout as a patch to a Jira issue it could be added at any time. Ralph

Re: Make LogEvent implementations Externalizable

2014-07-11 Thread Ralph Goers
! Gary div Original message /divdivFrom: Ralph Goers ralph.go...@dslextreme.com /divdivDate:07/11/2014 01:46 (GMT-05:00) /divdivTo: Log4J Users List log4j-user@logging.apache.org /divdivSubject: Re: Make LogEvent implementations Externalizable /divdiv /divI’d be afraid

Re: Extending Appenders

2014-07-14 Thread Ralph Goers
Did you import OutputStreamAppender, etc. and are log4j-api and log4j-core in the compile classpath? The “StubManager” is where all the real i/o happens and will typically persist across a reconfiguration if the Appender is still being used. For an OutputStreamAppender it would probably extend

[ANNOUNCEMENT] Apache Log4j 2.0 released

2014-07-16 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.0 release! Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available

Re: Cannot set up my custom layout in 2.0 (worked in rc1)

2014-07-17 Thread Ralph Goers
Matt, can you update the documentation to reflect these changes and tell users how to make it work with and without Maven? Ralph On Jul 17, 2014, at 8:31 AM, Matt Sicker boa...@gmail.com wrote: Yeah because it was only used for runtime loading. Now that log4j-core contains an annotation

Re: Cannot set up my custom layout in 2.0 (worked in rc1)

2014-07-17 Thread Ralph Goers
moved? Thanks, David On Thu, Jul 17, 2014 at 6:46 PM, Ralph Goers ralph.go...@dslextreme.com wrote: Matt, can you update the documentation to reflect these changes and tell users how to make it work with and without Maven? Ralph On Jul 17, 2014, at 8:31 AM, Matt Sicker boa

Re: Cannot set up my custom layout in 2.0 (worked in rc1)

2014-07-18 Thread Ralph Goers
versión of javac it wont'be noticed Sent via Xiaomi On Matt Sicker boa...@gmail.com, Jul 17, 2014 9:20 PM wrote: I'll add some documentation about it. However, the annotation processor would work with Ant or even just Make. It's part of javac. On 17 July 2014 13:48, Ralph Goers ralph.go

Re: How do I log into a JavaFX text area?

2014-07-20 Thread Ralph Goers
This is with version 2.0? Sent from my iPad On Jul 20, 2014, at 3:45 AM, Maciej Skrzetuski m.skrzetu...@gmail.com wrote: Hi Matt, thanks for replying and your suggestions. I did what you said but the CLASS_NOT_FOUND error still occurs. The debug log is at http://pastebin.com/595Q0bXY.

Re: why is AsyncLoggerContextSelector faster?

2014-07-21 Thread Ralph Goers
Take a look at http://logging.apache.org/log4j/2.x/manual/architecture.html. The configuration creates the LoggerConfig objects, not the Loggers. Loggers are created by applications and associated with LoggerConfigs. XMLConfiguration and JSONConfiguration are responsible for parsing their

Re: Typed log messages

2014-07-23 Thread Ralph Goers
If I understand correctly, you should create a custom Message that contains the object. The getFormattedMessage method should convert the object to a string. You can also create a Layout to format the object however you want if the event contains your custom Message. Sent from my iPad On Jul

Re: Logger.setLevel() not supported in 2.0?

2014-07-23 Thread Ralph Goers
In Log4j 2 Logger.setLevel() might now work the way you would expect. It would change the level of the specific logger, but it would not affect child loggers. So if you had a Logger(com.foo) and Logger(com.foo.bar), which both had effective levels of “error” and then you called setLevel on

Re: How to get Log4j2, Tomcat and Chainsaw work together?

2014-07-23 Thread Ralph Goers
I recall that there are dependencies on both the jackson 2.x and 1.x jars. Ralph On Jul 23, 2014, at 8:36 AM, Kari Arvonen suomila...@gmail.com wrote: Hello, Versions: - Apache Log4j2 2.0 release version - Apache Tomcat 7.0.54 - Apache Chainsaw 2.1 snapshot

Re: Flume Appender

2014-07-24 Thread Ralph Goers
Just for clarification, I tested that way because we wanted to insure there would never be any data loss - which you can have with async appenders and loggers. Sent from my iPad On Jul 24, 2014, at 2:59 AM, jfloviou jf_guilm...@hotmail.com wrote: Hi all, I'm digging out this Thread from

Re: problems with web app and JndiContextSelector

2014-07-29 Thread Ralph Goers
The best would be a sample project that demonstrates the problem. At a minimum I would think the web.xml and log4j 2 configuration. Ralph On Jul 29, 2014, at 5:47 AM, Mike Calmus m...@calmus.org wrote: I am having problems moving our web app over to Log4j 2.0 using JNDI lookups. I followed

Re: DefaultRolloeverStrategy

2014-07-30 Thread Ralph Goers
Remko, that is not exactly correct. If you specify %i in the filePattern once the max value is hit the oldest file that matches the complete pattern will be deleted automatically. The issue you are speaking of is that when the pattern includes a date via %d we will not delete files from

Re: DefaultRolloeverStrategy

2014-07-31 Thread Ralph Goers
? Thanks! On Wed, Jul 30, 2014 at 8:23 PM, Remko Popma remko.po...@gmail.com wrote: I stand corrected. Thanks, Ralph! Sent from my iPhone On 2014/07/31, at 8:14, Ralph Goers ralph.go...@dslextreme.com wrote: Remko, that is not exactly correct. If you specify %i in the filePattern

Re: log4j 2.0 - About StatusLogger logging level and console output

2014-07-31 Thread Ralph Goers
The original design was to have the status logger capture messages in a ring buffer. Then when a listener became available it could print the queued messages. I know it has been tweaked recently so I am not 100% sure if it is still working that way, but that is why it is a bit more complicated

Re: Custom ConfigurationFactory not loaded

2014-07-31 Thread Ralph Goers
Matt, Your answer is incorrect. No system property needs to be set. Ralph On Jul 31, 2014, at 7:37 PM, Matt Sicker boa...@gmail.com wrote: I think you may still need to set the system property (or equivalent properties file) to override the default ConfigurationFactory. On 31 July 2014

Re: Custom ConfigurationFactory not loaded

2014-07-31 Thread Ralph Goers
Remko, Your answer is incorrect. All ConfigurationFactories are annotated as plugins. Ralph On Jul 31, 2014, at 7:04 PM, Remko Popma remko.po...@gmail.com wrote: The configuration factory is responsible for parsing a config file and creating a Configuration object. As such, it must exist

Re: Custom ConfigurationFactory not loaded

2014-07-31 Thread Ralph Goers
Your annotations are correct. However, in the code snippet below you don’t show what getSupportedTypes() returns. The generic ConfigurationFactory inspects all the ConfigurationFactory plugins using the order to determine which should be inspected first, second, etc. It calls getSupportedTypes

Re: Custom ConfigurationFactory not loaded

2014-07-31 Thread Ralph Goers
(“com.myorg.mypackage”) to have the plugin manager search for your plugin. Ralph On Jul 31, 2014, at 10:26 PM, Ralph Goers ralph.go...@dslextreme.com wrote: Your annotations are correct. However, in the code snippet below you don’t show what getSupportedTypes() returns. The generic

Re: Custom ConfigurationFactory not loaded

2014-08-02 Thread Ralph Goers
is that the method getSupportedTypes() is never called ! (It's return a custom extension: .myorg) I'm using 2.0. And even a call to PluginManager.addPackage(“com.myorg.mypackage”) doesn't works. Clément On Thu, Jul 31, 2014 at 10:31 PM, Ralph Goers ralph.go...@dslextreme.com wrote

Re: log4j 2.0 - About StatusLogger logging level and console output

2014-08-02 Thread Ralph Goers
What he may really want is a way to register the console listener earlier - via a system property. Ralph On Aug 1, 2014, at 12:24 AM, Remko Popma remko.po...@gmail.com wrote: Ok. Take a look at the system properties section of the Configuration manual page. There seem to be two settings.

Re: log4j 2.0 - About StatusLogger logging level and console output

2014-08-03 Thread Ralph Goers
looked at the code but I thought that's what one of those sys props did... Sent from my iPhone On 2014/08/03, at 14:57, Ralph Goers ralph.go...@dslextreme.com wrote: What he may really want is a way to register the console listener earlier - via a system property. Ralph On Aug 1, 2014

Re: Log4j2 property file (external)

2014-08-03 Thread Ralph Goers
Please open a Jira issue for this enhancement. It makes sense to add an optional attribute to the properties element to allow you to specify the location of the file. However, you should be able to use XInclude to include a separate XML file that has just the properties element and its

Re: Separate the event logs generated by EventLogger Logs. How?

2014-08-05 Thread Ralph Goers
The normal way to segregate events would be to filter on something in the StucturedDataMessage - either the event type, event id or one of the attributes. Ralph On Aug 5, 2014, at 5:12 AM, parkirat parki...@bsb.in wrote: Hi All, I got the issue fixed. Change the configuration of log4j2.xml

Re: Set the log level based on command line args

2014-08-06 Thread Ralph Goers
Please see http://logging.apache.org/log4j/2.x/manual/configuration.html#Additivity Ralph On Aug 6, 2014, at 10:42 AM, Arwen Pond ap...@book.com wrote: I am investigating migrating from log4j 1 to log4j 2. A pattern that I have in many of my applications is setting the log level based on

Re: Set the log level based on command line args

2014-08-06 Thread Ralph Goers
I should also add that your configuration didn’t show a root logger. There is always a root logger so I suspect you are also logging to it. If you make all your loggers be configured with additivity=“false” that should stop happening. Ralph On Aug 6, 2014, at 1:13 PM, Ralph Goers ralph.go

Re: how to change logging level for a class at runtime [I]

2014-08-06 Thread Ralph Goers
log level for any class/package dynamically via jmx cheers, Phil From: Ralph Goers rgo...@apache.org To: Log4J Users List log4j-user@logging.apache.org, Date: 24/06/2014 15:34 Subject: Re: how to change logging level for a class at runtime Phil, That looks pretty

Re: Set the file name based on command line args

2014-08-06 Thread Ralph Goers
the main thread and walks up the stack to the public static main(String[]) main methods and gets the arguments from the stack... Gary On Wed, Aug 6, 2014 at 6:54 PM, Ralph Goers ralph.go...@dslextreme.com wrote: Well…. You would really be passing the name of the file to the Appender

Re: Multiple configuration files?

2014-08-11 Thread Ralph Goers
Arwen, Please note that the paragraphs below indicating the message is proprietary cannot apply to this message. This is a public mailing list and this message will be archived forever in at least 3 other places not under the control of the Apache Software Foundation. Please make sure to

Re: Any Apache projects using Log4j2 yet?

2014-08-18 Thread Ralph Goers
I've seen mention for one or two, but I don't remember what they are Sent from my iPad On Aug 18, 2014, at 4:53 PM, Matt Sicker boa...@gmail.com wrote: I know all the ones I'm interested in haven't added any support yet (other than the ones that already use SLF4J which gives implicit Log4j2

Re: plugin-registration failing

2014-08-22 Thread Ralph Goers
Using the annotation processor seemed like a more natural and automatic way to invoke the plugin processor. If there are ways we can configure things to make it easier just let us know. The processor doesn’t look in just one jar though so I don’t know why it didn’t find your file. Logically

Re: Log4j2 SyslogAppender / SyslogLayout and message format

2014-08-22 Thread Ralph Goers
I thought about this when I implemented the SyslogLayout. The problem here is that only a subset of the pattern converters should be available in the SyslogLayout since some of them are already there. What you are proposing below changes the semantics of a Layout - they have access to

Re: Log4j2 with SL4J Adapter

2014-08-23 Thread Ralph Goers
I am really not clear on what the issue is. It seems you have things configured so that you can write to the Log4j 2 API but actually use SLF4J for logging. There is nothing wrong with that but if you are routing to SLF4J and using SLF4J Simple Logger then the Log4j 2 configuration won’t even

Re: new catching syntax

2014-08-24 Thread Ralph Goers
Note that a call to catching(e) results in logMessage(FQCN, Level.ERROR, CATCHING_MARKER, catchingMsg(t), t); Notice that the message is already filled in with the string “catching”, so specifying another message string wouldn’t make any sense. As Matt said, if you want more than just the

Re: Extending Appenders

2014-08-29 Thread Ralph Goers
This is a fair point. There are some things not in the API that we wouldn’t change as they would also break compatibility, such as the Layout or Appender interface, but we aren’t guaranteeing that specific Appender or Layout instances won’t have a new parameter added to them or things like

Re: Log4j2's SimpleLogger Implementation Issue for var args method's

2014-09-02 Thread Ralph Goers
What will you do instead of throwing an ArrayIndexOutOfBoundsException? This is obviously a user error. It would be misleading (but maybe acceptable) to substitute “null” for the placeholders, but just throwing a different exception probably isn’t worth the trouble. Ralph On Sep 2, 2014, at

Re: Extending Appenders

2014-09-02 Thread Ralph Goers
sends the mail or throttles and sends at high priority. So, my thought is that I would extend the SmtpAppender and override the sendEvents method to write out the contents of the buffer to a file. This approach has worked great with log4j 1.x. Mike On Aug 29, 2014, at 11:28 PM, Ralph

Re: Log4j2's SimpleLogger Implementation Issue for var args method's

2014-09-02 Thread Ralph Goers
a conditional check params.length 0 with then the if @ line 157 wouldn't end up throwing the error and print the given message Regards, -Yogesh On Tue, Sep 2, 2014 at 9:45 PM, Ralph Goers ralph.go...@dslextreme.com wrote: What will you do instead of throwing

Re: org.apache.loggin.log4j.core.pattern.DatePatternConverter blocking

2014-09-03 Thread Ralph Goers
The converter uses a SimpleDateFormat which is not thread safe and so is synchronized. I am sure there might be minor optimizations that could be done to this What I would do is modify DatePatternConverter to a) use Java 8’s java.time.format.DateTimeFormatter if running on Java 8 b) use Joda

Re: org.apache.loggin.log4j.core.pattern.DatePatternConverter blocking

2014-09-03 Thread Ralph Goers
mohitanch...@gmail.com wrote: Issue created https://issues.apache.org/jira/browse/LOG4J2-812 On Wed, Sep 3, 2014 at 4:28 PM, Ralph Goers ralph.go...@dslextreme.com wrote: The converter uses a SimpleDateFormat which is not thread safe and so is synchronized. I am sure there might

Re: org.apache.loggin.log4j.core.pattern.DatePatternConverter blocking

2014-09-03 Thread Ralph Goers
3, 2014 at 4:28 PM, Ralph Goers ralph.go...@dslextreme.com javascript:; wrote: The converter uses a SimpleDateFormat which is not thread safe and so is synchronized. I am sure there might be minor optimizations that could be done to this What I would do is modify DatePatternConverter

Re: Logging requirement for PCI (payment card industry)

2014-09-08 Thread Ralph Goers
Christian, I started work on Log4j 2 primarily for use by my employer at the time, who performs internet banking activities. As such, losing audit events is not acceptable in that environment. I am not really clear on what you are asking. If you don’t specify a monitorInterval on your

[ANNOUNCEMENT] Apache Log4j 2.1 released

2014-10-24 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.1 release! Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available

Re: lo4j2.xml in EAR

2014-11-01 Thread Ralph Goers
I am not aware that we have implemented any specific support for EARs. That said, I am not sure we need to. I’ve also looked at the Log4j 1.x code and don’t see anything specific to supporting META-INF or EARs. Log4j will load log4j2.xml from the classpath, so you should be able to do

Re: RollingFileAppender appears to be losing log entries

2014-11-02 Thread Ralph Goers
1. I would check bugzilla to see if anyone has reported this. I don’t recall seeing anything like it in the last 4 years. 2. Log4j 1.x is not actively maintained. Even if you find that it is a bug it is unlikely to ever be fixed. Upgrading to Log4j 2 is recommended. Ralph On Nov 2, 2014, at

Re: RollingFileAppender appears to be losing log entries

2014-11-02 Thread Ralph Goers
-log4j12-1.7.6.jar and replace them with the log4j-slf4j-impl, log4j-api and log4j-core jars (+ log4j-web in a servlet container). Ralph On Nov 2, 2014, at 5:02 PM, Shawn Heisey apa...@elyograg.org wrote: On 11/2/2014 12:57 PM, Ralph Goers wrote: 1. I would check bugzilla to see if anyone

Re: lo4j2.xml in EAR

2014-11-03 Thread Ralph Goers
this out, I'd be happy to hear someone's success story. Cheers, Paul On Sat, Nov 1, 2014 at 7:00 PM, Ralph Goers ralph.go...@dslextreme.com wrote: I am not aware that we have implemented any specific support for EARs. That said, I am not sure we need to. I’ve also looked at the Log4j 1.x

Re: lo4j2.xml in EAR

2014-11-03 Thread Ralph Goers
will fail. Cheers, Paul On Mon, Nov 3, 2014 at 2:42 PM, Ralph Goers ralph.go...@dslextreme.com wrote: The Log4j API is going to look for its implementation. It does that by looking for a property file using ClassLoader.getResources(). If that file cannot be located because

Re: lo4j2.xml in EAR

2014-11-03 Thread Ralph Goers
On Mon, Nov 3, 2014 at 2:42 PM, Ralph Goers ralph.go...@dslextreme.com wrote: The Log4j API is going to look for its implementation. It does that by looking for a property file using ClassLoader.getResources(). If that file cannot be located because it is in a different ClassLoader then you

Re: log4j2.xml in EAR

2014-11-03 Thread Ralph Goers
This looks to be somewhat JBoss specific. Ralph On Nov 3, 2014, at 2:52 PM, Gary Gregory garydgreg...@gmail.com wrote: Sound like we need a doc page for this set up! Wow. Gary div Original message /divdivFrom: Paul Benedict pbened...@apache.org /divdivDate:11/03/2014

Re: log4j2.xml in EAR

2014-11-03 Thread Ralph Goers
/WFLY-1037 Cheers, Paul On Mon, Nov 3, 2014 at 3:56 PM, Ralph Goers ralph.go...@dslextreme.com wrote: This looks to be somewhat JBoss specific. Ralph On Nov 3, 2014, at 2:52 PM, Gary Gregory garydgreg...@gmail.com wrote: Sound like we need a doc page for this set up! Wow. Gary

Re: How to print timestamp on each log line of a stack trace?

2014-11-05 Thread Ralph Goers
You would have to create a custom ThrowablePatternConverter. Ralph On Nov 5, 2014, at 12:03 PM, Alexey Zavizionov alexey.zavizio...@gmail.com wrote: Here is the output, when an application is throwing an exception, logging it to log, including its stack trace. E 1105-2042:17,349

Re: Log to REST service

2014-11-12 Thread Ralph Goers
Of course it is possible, but sending events 1 at a time could be a performance problem with high volume. In addition, we would have to define the REST api - it can't be arbitrary. Perhaps you could explain what you are trying to do? Ralph On Nov 12, 2014, at 4:01 AM, youri flement

Re: Log4j 2.1 and compilation memory usage

2014-11-23 Thread Ralph Goers
I believe the annotation processor was also added between those releases. Do you have your own Log4j plugins? I am not sure if the annotation processor can be configured to ignore packages. Ralph On Nov 22, 2014, at 5:45 PM, Gary Gregory garydgreg...@gmail.com wrote: Is the Log4j version

Re: Using log4j2 2.1 over slf4j 1.7.7 in Eclipse RCP

2014-11-24 Thread Ralph Goers
I recall someone posting a similar setup to either this list or the dev list where they got it working. I would search the mailing lists for posts regarding OSGi. Ralph On Nov 24, 2014, at 2:58 AM, Stephan Druskat stephan.drus...@uni-jena.de wrote: Dear List, I'm developing an

Re: What happened to Telnet-Appender in log4j2?

2014-11-25 Thread Ralph Goers
It was overlooked. Please create a Jira issue to add it. Raph On Nov 25, 2014, at 9:49 AM, J.Hoffmann jueh...@gmx.de wrote: Hi everybody, We have used the Telnet-Appender with log4j. When migrating to log4j2 I have seen, that it seem to doesn't exist anymore in log4j2? I was even not

Re: Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread Ralph Goers
What do you mean by “request flow”? You can certainly do this in your code. Ralph On Dec 19, 2014, at 6:10 AM, James Hutton james.a.hut...@gmail.com wrote: I have some libraries that leverage slf4j for logging (can't change it) however my application leverages log4j2 and the slf4j-log4j2

Re: logging level per thread

2015-02-18 Thread Ralph Goers
wrote: This is the filter i need. Is there a performance hit to using the filters? On Feb 17, 2015 5:24 PM, Ralph Goers ralph.go...@dslextreme.com wrote: I apologize. I pointed you at the wrong filter. The one you want is the DynamicThresholdFilter - http://logging.apache.org/log4j/2.x

Re: logging level per thread

2015-02-17 Thread Ralph Goers
a level as well. It looks like I want/need a combination of the ThreadContextMapFilter and the ThresholdFilter. A ThreadContextMapThresholdFilter perhaps? On Fri, Feb 13, 2015 at 11:39 AM, Ralph Goers ralph.go...@dslextreme.com wrote: See http://logging.apache.org/log4j/2.x/manual

Re: migration from log4j 1.2 to log4j2: locationInformation and getAppender() are missing

2015-01-23 Thread Ralph Goers
What are you trying to do with the locationInfo? Appenders are not directly attached to Loggers. Every logger will be associated with a LoggerConfig. The LoggerConfig may be associated with one or more Appenders. It would be helpful to know a little more about what you are trying to do.

Re: Redirect log4j to JUL

2015-01-05 Thread Ralph Goers
It isn’t a “trap”. It is simply that you are the first person to ask for the feature - at least in the last 4 years that I have been following this list. We generally only implement things either we want to use ourselves or that we find interesting or compelling. If you, or someone else,

Re: logging level per thread

2015-02-13 Thread Ralph Goers
See http://logging.apache.org/log4j/2.x/manual/eventlogging.html http://logging.apache.org/log4j/2.x/manual/eventlogging.html. You would then use http://logging.apache.org/log4j/2.x/manual/filters.html#ThreadContextMapFilter

Re: Classloader issue in karaf

2015-02-10 Thread Ralph Goers
“Both bundles”? In OSGi doesn’t that mean they will have separate ClassLoaders? Ralph On Feb 10, 2015, at 2:15 AM, Honey Goyal er.honey2...@gmail.com wrote: I am getting thise error *ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath.

Re: Redirect log4j to JUL

2015-01-05 Thread Ralph Goers
FWIW, both Log4j 1.x and Commons Logging were implemented before JDK 1.4 when Java logging was introduced. I have been told the JDK spec writers spoke to Ceki (a significant contributor to Log4j 1.x) and mostly ignored what he advised them to do. As a consequence SLF4J, Logback and Log4j 2 all

Re: Layout by Reference?

2015-03-06 Thread Ralph Goers
This is a good idea. If you can provide a patch that would be great too! Ralph On Mar 6, 2015, at 2:48 PM, jeremy majikt...@gmail.com wrote: It would be nice if config supported by reference layout definition (LayoutRef / Layout ref=XX) similar to the way we can use AppenderRef/Appender

Re: Intermittent log file compression issue

2015-03-25 Thread Ralph Goers
Yes, that is the correct answer. As a matter of course you should never cause a file to be open for write from a) multiple web applications or b) multiple processes without using file locking. Note that RollingFileAppender clearly says it does not support file locking - there are just too many

[ANNOUNCEMENT] Apache Log4j 2.2 released

2015-02-26 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.2 release! Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as

[ANNOUNCEMENT] Apache Log4j 2.3 released

2015-05-15 Thread Ralph Goers
. o LOG4J2-1008: org.apache.logging.log4j.core.config.plugins.util.ResolverUtil.extractPath(URL) incorrectly converts '+' characters to spaces. Thanks to Ralph Goers, Gary Gregory. o LOG4J2-1007: org.apache.logging.log4j.core.util#fileFromUri(URI uri) incorrectly converts '+' characters

Re: log4j2 web lookup questions

2015-04-11 Thread Ralph Goers
If the code below is yours than I would recommend having it extend Log4jServletContainerInitializer and then have the first line of your onStartup() method do super.onStartup(). That should make sure that Log4j initializes before Spring. You can also remove the Log4jServletContextListener from

Re: suppress beanutils logging for certain fields

2015-04-04 Thread Ralph Goers
I can’t think of any way to do this in log4j 1.x. You could make a custom copy of commons beanutils and remove the log statement that is causing the problem. You could also open a Jira issue against commons beanutils and ask that this be fixed. Ralph On Apr 3, 2015, at 9:58 PM, arjun Sirupa

Re: how to reinitialize log4j2 configuration?

2015-06-05 Thread Ralph Goers
Once you have a LoggerContext you can call context.setConfigLocation(configLocation) where configLocation is a URI. That will force a reconfiguration. Ralph On Jun 5, 2015, at 4:33 PM, Benjamin Jaton benjamin.ja...@gmail.com wrote: Hello After an initial configuration of log4j2 with:

Re: Write log files relative to log4j2.xml?

2015-06-09 Thread Ralph Goers
? On 9 June 2015 at 22:36, Ralph Goers ralph.go...@dslextreme.com wrote: There is nothing now but I would imagine it wouldn’t be too difficult to add a variable that contains the base url or path of the configuration file in use. Ralph On Jun 9, 2015, at 12:08 PM, Adam Retter adam.ret

Re: Write log files relative to log4j2.xml?

2015-06-09 Thread Ralph Goers
There is nothing now but I would imagine it wouldn’t be too difficult to add a variable that contains the base url or path of the configuration file in use. Ralph On Jun 9, 2015, at 12:08 PM, Adam Retter adam.ret...@googlemail.com wrote: Hi there, Is it somehow possible to specify that

Re: Checking if logger is enabled for a specific marker

2015-06-23 Thread Ralph Goers
I’m surprised that case isn’t working for you. Looking at the code leads me to believe it should but I will have to test it myself to see what is going on. That could take a few days. Ralph On Jun 22, 2015, at 5:22 AM, David KOCH dk...@ezakus.com wrote: Hello, Is there any way to

Re: SMTP appender + filter

2015-06-25 Thread Ralph Goers
The level associated with the root appender is info. No debug events will make it past that. Ralph On Jun 25, 2015, at 3:39 PM, Benjamin Jaton benjamin.ja...@gmail.com wrote: Hello, I am trying to create a filter at the appender level that would show all the messages that contain Show.

Re: Log4j 2 plugin in Scala

2015-05-28 Thread Ralph Goers
Does Scala support Annotations? Ralph On May 28, 2015, at 6:12 PM, Gary Gregory garydgreg...@gmail.com wrote: The answer would be the same for any Java code base that allows plugins via Class.forName(). This is question is not unique to Log4j as it does not know of anything else but the

Re: Log4j - Jul Bridge in a web application

2015-07-03 Thread Ralph Goers
I am a bit confused. If you are trying to run a web application what is Maven doing in the picture? That would indicate you are having some trouble during your build, not when you are running your web application. Ralph On Jul 3, 2015, at 7:38 AM, Jose Luis Valencia jvalen...@rocoto.com.pe

Re: Hide *.jar

2015-06-29 Thread Ralph Goers
This is an excerpt from a stack trace. Assuming it is coming from a log message (you don’t actually have enough below to know for sure), then to filter specific packages from the stack trace you would need to use the filters keyword on the rEx or xEx converters in the PatternLayout. If you

Re: Hide *.jar

2015-06-29 Thread Ralph Goers
/2015 12:04 PM, Ralph Goers wrote: Can you post the full output of the log event? Here it is. Red lines are the ones I want to hide. 2015-Jun-29 12:10:39.214 [http-8080-5] ERROR DBUtilUser - set gui_model Error: could not extract ResultSet SELECT ** ORDER BY 1, 2, 3 2015-Jun

Re: Hide *.jar

2015-06-29 Thread Ralph Goers
Can you post the full output of the log event? Ralph On Jun 29, 2015, at 8:45 AM, Emi Lu em...@encs.concordia.ca wrote: This is an excerpt from a stack trace. Assuming it is coming from a log message (you don’t actually have enough below to know for sure), then to filter specific

Re: log4j2 for java 1.6.x?

2015-05-25 Thread Ralph Goers
If there is something you need for 1.6 just let us know. We can always do another 1.6 release if it is needed. Ralph On May 25, 2015, at 11:06 AM, Emi Lu em...@encs.concordia.ca wrote: On 05/25/2015 01:40 PM, Andreas Opitz wrote: Hi for more details, see

Re: log4j2 for java 1.6.x?

2015-05-25 Thread Ralph Goers
it clearer on the site what outr road map is and republish the site? I would even be OK with another release as I recently fixed a long standing bug that makes console logging in eclipse ugly (noconsolenoansi does not work in one case). Gary Original message From: Ralph Goers

Re: Translating log levels

2015-05-19 Thread Ralph Goers
I am assuming you want the Level in the output to say WARN instead of ERROR - otherwise simple filtering at the Logger would get you the output. You can use the RewriteAppender to modify the Level to what you want. Ralph On May 19, 2015, at 8:10 AM, Mikael Ståldal mikael.stal...@magine.com

Re: log4j2 for java 1.6.x?

2015-05-26 Thread Ralph Goers
, Ralph Goers ralph.go...@dslextreme.com mailto:ralph.go...@dslextreme.com wrote: To be clear, the plan is to do future enhancements against Java 1.7, but if there is a bug or feature that is absolutely needed we can create releases for Java 1.6. Hopefully you are aware of Oracle’s Java

Re: log4j2 for java 1.6.x?

2015-05-26 Thread Ralph Goers
To be clear, the plan is to do future enhancements against Java 1.7, but if there is a bug or feature that is absolutely needed we can create releases for Java 1.6. Hopefully you are aware of Oracle’s Java Roadmap - http://www.oracle.com/technetwork/java/eol-135779.html

Re: Multi thread initialization problem

2015-08-13 Thread Ralph Goers
We are seeing your emails. The users list is just generally pretty quiet. Go ahead and create a Jira and attach something that will reproduce the problem. Ralph On Aug 13, 2015, at 12:09 AM, Xen x...@dds.nl wrote: I get the same result from your code. Only thread-2 outputs something,

Re: Including current date postfix in fileName (log4j2)

2015-07-30 Thread Ralph Goers
Yes, we have an enhancement request in Jira for that. Ralph On Jul 30, 2015, at 7:16 PM, no jihun jees...@gmail.com wrote: thank you for your concern but it seems like neither RollingFileAppender nor RollingRandomAccessFileAppender

Re: dynamic configuration

2015-08-09 Thread Ralph Goers
, Ralph Goers ralph.go...@dslextreme.com wrote: Yes. Ralph On Aug 8, 2015, at 4:03 PM, Gary Gregory garydgreg...@gmail.com wrote: That's my bad, I misread Configurator for Configuration. That said, the method org.apache.logging.log4j.core.config.AbstractConfiguration.getRootLogger

Re: dynamic configuration

2015-08-08 Thread Ralph Goers
LoggerConfig logger = entry.getValue(); ? On Fri, Aug 7, 2015 at 5:43 AM, Ralph Goers ralph.go...@dslextreme.com wrote: I'd recommend the Configurator class. Ralph On Aug 6, 2015, at 9:46 PM, Gary Gregory garydgreg...@gmail.com wrote: For the simple case where you want to update one

Re: dynamic configuration

2015-08-08 Thread Ralph Goers
but I'll go about experimenting with its configuration in the coming days. Thanks you for your help in any case :). See ya :). X. Quoting Ralph Goers ralph.go...@dslextreme.com: I guess you can't please everybody

Re: dynamic configuration

2015-08-08 Thread Ralph Goers
might want to add an existing appender as a reference to a LoggerConfig, or create a new Appender and then add that to a LoggerConfig, or add a Filter, etc, before updateLoggers is called. Ralph On Aug 8, 2015, at 11:26 AM, Ralph Goers ralph.go...@dslextreme.com wrote: Sorry if it appears

Re: dynamic configuration

2015-08-08 Thread Ralph Goers
+ */ +void setRootLevel(Level level); } Gary On Sat, Aug 8, 2015 at 11:14 AM, Ralph Goers ralph.go...@dslextreme.com wrote: Yup. And while your at it you might want to add setRootLevel(Level level); Ralph On Aug 8, 2015, at 10:19 AM, Gary Gregory garydgreg...@gmail.com

Re: dynamic configuration

2015-08-08 Thread Ralph Goers
to add it? Gary On Sat, Aug 8, 2015 at 3:42 PM, Ralph Goers ralph.go...@dslextreme.com wrote: I just noticed you added this to AbstractConfiguration. Wouldn’t it be easier for users to do it as a method on Configurator? Ralph On Aug 8, 2015, at 12:55 PM, Gary Gregory garydgreg

Re: dynamic configuration

2015-08-06 Thread Ralph Goers
1. There are examples that show how to modify the configuration programmatically. I recently created an example that is checked into the log4j-samples subproject. However, it is probably more complicated than what you are asking for. 2. Log4j 1 intermixed the public API that applications used

<    1   2   3   4   5   6   7   8   9   10   >