Not able to add Appender + Logger programmatically and log

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Not able to add Appender + Logger programmatically and log

Stefan Wendelmann
Hi log4j Team,

i am in struggle with log4j2 for a few weeks now.

I got a JDBC Appender in my XML Config and want to programmatically add a Logger for each Job/Task
to configure ist level programmatically, with two refs.


  1.  Ref is a FileAppender wich is also added/configured programmatically
  2.  Ref ist he mentiont JDBC Appender from the XML Config

The JDBC Appender is working fine but the programmatically added configs wont work, i just get the log to Console output.

I made up a full example including JUnit test of my work on github  see: https://github.com/stefanwendelmann/JavaLogging

I would be very pleased if you could help me.

Thanks in advance 😊

Stefan Wendelmann
Reply | Threaded
Open this post in threaded view
|

AW: Not able to add Appender + Logger programmatically and log

Stefan Wendelmann
Hey log4j Team,

may i ask if i can get any help in this.
I know you do this in your freetime, but we have serious problems with that memory leak.

I already made up a ticket and a stackoverflow but still got no fitting answer.

https://issues.apache.org/jira/browse/LOG4J2-2589

https://stackoverflow.com/questions/55905449/memory-leak-with-log4j2-custom-hibernate-appender


Thanks in advance!


Stefan Wendelmann

Von: Stefan Wendelmann
Gesendet: Donnerstag, 2. Mai 2019 16:54
An: [hidden email]
Betreff: Not able to add Appender + Logger programmatically and log

Hi log4j Team,

i am in struggle with log4j2 for a few weeks now.

I got a JDBC Appender in my XML Config and want to programmatically add a Logger for each Job/Task
to configure ist level programmatically, with two refs.


  1.  Ref is a FileAppender wich is also added/configured programmatically
  2.  Ref ist he mentiont JDBC Appender from the XML Config

The JDBC Appender is working fine but the programmatically added configs wont work, i just get the log to Console output.

I made up a full example including JUnit test of my work on github  see: https://github.com/stefanwendelmann/JavaLogging

I would be very pleased if you could help me.

Thanks in advance 😊

Stefan Wendelmann
Reply | Threaded
Open this post in threaded view
|

Re: Not able to add Appender + Logger programmatically and log

Matt Sicker
Hi,

I'm not sure about specifics on fixing it as I've been working on some
other things lately here, but we typically look through the open bug list
and fixing what we can before preparing a release, so this issue hasn't
been lost or anything.

On Mon, 27 May 2019 at 05:38, Stefan Wendelmann <[hidden email]>
wrote:

> Hey log4j Team,
>
> may i ask if i can get any help in this.
> I know you do this in your freetime, but we have serious problems with
> that memory leak.
>
> I already made up a ticket and a stackoverflow but still got no fitting
> answer.
>
> https://issues.apache.org/jira/browse/LOG4J2-2589
>
>
> https://stackoverflow.com/questions/55905449/memory-leak-with-log4j2-custom-hibernate-appender
>
>
> Thanks in advance!
>
>
> Stefan Wendelmann
>
> Von: Stefan Wendelmann
> Gesendet: Donnerstag, 2. Mai 2019 16:54
> An: [hidden email]
> Betreff: Not able to add Appender + Logger programmatically and log
>
> Hi log4j Team,
>
> i am in struggle with log4j2 for a few weeks now.
>
> I got a JDBC Appender in my XML Config and want to programmatically add a
> Logger for each Job/Task
> to configure ist level programmatically, with two refs.
>
>
>   1.  Ref is a FileAppender wich is also added/configured programmatically
>   2.  Ref ist he mentiont JDBC Appender from the XML Config
>
> The JDBC Appender is working fine but the programmatically added configs
> wont work, i just get the log to Console output.
>
> I made up a full example including JUnit test of my work on github  see:
> https://github.com/stefanwendelmann/JavaLogging
>
> I would be very pleased if you could help me.
>
> Thanks in advance 😊
>
> Stefan Wendelmann
>


--
Matt Sicker <[hidden email]>