logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Programmatic configuration => NPE
Date Thu, 09 Jun 2016 12:45:28 GMT
Do you have a stacktrace?

Sent from my iPhone

> On 2016/06/09, at 20:09, Jochen Wiedmann <jochen.wiedmann@gmail.com> wrote:
> 
> Hi,
> 
> what is wrong with the following code, please (gives an NPE within
> getLogger, MyConfigurationFactory is never being invoked).
> 
>    public static void main(String[] pArgs) {
>        ConfigurationFactory.setConfigurationFactory(new
> MyConfigurationFactory());
>        final Logger log = LogManager.getLogger(Main.class);
>        log.info("Starting");
>    }
> 
> Thanks,
> 
> Jochen
> 
> -- 
> The next time you hear: "Don't reinvent the wheel!"
> 
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message