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
>
> private static final Logger LOGG
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!"
http://www.keystonedevelopment.co.uk/wp-content/uploa
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 a
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 possi
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 suggeste
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
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
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 iterati
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
Configurato
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?
>
> http://stackoverflow.com/questions/24179375/eclipse-rcp-java-lang-classnotfoundexcept
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
>>
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
http://events.linuxfoundation.org/events/apache-bi
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 Schultz wrote:
>>> So, I implement
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 numb
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 that Log4j 1 is broken in Java
15 matches
Mail list logo