Re: [log4j 1.x] Batch-sending with SMTPAppender

2016-11-30 Thread Remko Popma
Details are here: https://blogs.apache.org/logging/entry/moving_on_to_log4j_2 Sent from my iPhone > On 1 Dec 2016, at 10:32, Christopher Schultz > wrote: > > Remko, > >> On 11/30/16 5:26 PM, Remko Popma wrote: >> Chris, >> >> Glad to hear that. >> >> Be aware

Re: [log4j 1.x] Batch-sending with SMTPAppender

2016-11-30 Thread Christopher Schultz
Remko, On 11/30/16 5:26 PM, Remko Popma wrote: > Chris, > > Glad to hear that. > > Be aware that Log4j 1 is broken in Java 9 so you will need to go to > Log4j 2 when you upgrade Java. I'm curious... in what way is log4j 1.x broken in Java 9? I've been meaning to switch to log4j 2.x for a

Re: [log4j 1.x] Batch-sending with SMTPAppender

2016-11-30 Thread Remko Popma
Chris, Glad to hear that. Be aware that Log4j 1 is broken in Java 9 so you will need to go to Log4j 2 when you upgrade Java. Remko Sent from my iPhone > On 1 Dec 2016, at 1:41, Christopher Schultz > wrote: > > All, > > On 11/17/16 10:28 AM, Christopher

Save the date: ApacheCon Miami, May 15-19, 2017

2016-11-30 Thread Rich Bowen
Dear Apache enthusiast, ApacheCon and Apache Big Data will be held at the Intercontinental in Miami, Florida, May 16-18, 2017. Submit your talks, and register, at http://apachecon.com/ Talks aimed at the Big Data section of the event should go to

Re: [log4j 1.x] Batch-sending with SMTPAppender

2016-11-30 Thread Christopher Schultz
All, On 11/17/16 10:28 AM, Christopher Schultz wrote: >> So, I implemented an event trigger class in my driver class like this: >> >> package com.my; >> public class Driver >> { >> [...] >> public static class NeverTriggeringEventEvaluator >> implements TriggeringEventEvaluator >>

Re: ClassNotFoundException trying to use JDBC appender

2016-11-30 Thread Michael Carman
Benjamin, I had seen that and tried it unsuccessfully, but must have done something wrong. My second attempt was successful. Thanks! On Tue, Nov 29, 2016 at 7:01 PM Benjamin Jaton wrote: > Would that help? > >

Re: Switching log levels at runtime with log4j2

2016-11-30 Thread Marcel Stör
On 30.11.16 15:43, Apache wrote: > Are you really sure you want to get the Loggers? Changing the logging level > of a Logger doesn’t really work by itself. You really need to change the > level of its associated LoggerConfig. Yep, I know. Updating is not the problem (I think). I use

RE: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Tarun Sharma
Hi Remko and Ralph, Thank you for your inputs. I tried adding the context.updateLoggers() after initializing the context and it worked. I do agree that it would make better sense to have properties within log4j configuration to tailor for each application. I will try that in the next

Re: Switching log levels at runtime with log4j2

2016-11-30 Thread Apache
Are you really sure you want to get the Loggers? Changing the logging level of a Logger doesn’t really work by itself. You really need to change the level of its associated LoggerConfig. If you need a LoggerConfig that actually matches the Logger’s name, and one doesn’t already exist, then you

Re: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Apache
Remko, since he is using Configurator he shouldn’t have to call updateLoggers. However, he is calling System.setProperty to set the LoggerContext implementation to use AFTER the static Logger is created. There is no hope that could ever work. The best way to fix that would be to add the setting

Re: Switching log levels at runtime with log4j2

2016-11-30 Thread Marcel Stör
On 29.11.16 05:31, Matt Sicker wrote: > You could use the log4j-core implementation of LoggerContext.getLoggers() > to list the current known loggers. > https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/LoggerContext.html#getLoggers() Yep, that was also

Re: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Remko Popma
The first line: private static final Logger LOGGER = LogManager.getLogger(TestLog.class); is executed before the code in main(). This means that Log4j will initialize to the default configuration (since it cannot find a configuration file). After that, your code in main() kicks in. It is

RE: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Tarun Sharma
Hi Mikael, The product I am working on holds about 15 odd configurations which are specific to different process that run as part of the application. It is a core java app. So, every time a process starts the configuration is loaded on the fly. We store configurations in a properties file with

Re: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Jochen Wiedmann
On Wed, Nov 30, 2016 at 9:41 AM, Mikael Ståldal wrote: > Any particular reason for not using a configuration file? Do you have reason to believe, that this would change the behaviour? -- The next time you hear: "Don't reinvent the wheel!"

Re: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Mikael Ståldal
Any particular reason for not using a configuration file? On Wed, Nov 30, 2016 at 5:31 AM, Tarun Sharma wrote: > Hi, > > > > While upgrading from 1.2.17 to 2.5, I have come across a major > difference. Please see following code snippets. > > > > Log4j1.2.17 > >