Re: Async logging using lmax disruptor is consuming more heap memory

2024-02-20 Thread Remko Popma
197 KB for each log message! That’s about 100-1000x larger than the average message size. I would suggest having a much smaller ringbuffer, meaning fewer slots. The system property that controls this is log4j2.asyncLoggerRingBufferSize The default is (256 * 1024), which is a lot. The minimum

Re: RFC5424Layout - How to format timestamp with microsecond precision

2021-12-30 Thread Remko Popma
ns the system time. > */ > public final class SystemClock implements Clock { > >/** > * Returns the system time. > * @return the result of calling {@code System.currentTimeMillis()} > */ >@Override >public long currentTimeMillis() { >ret

Re: RFC5424Layout - How to format timestamp with microsecond precision

2021-12-29 Thread Remko Popma
Atul, The nanoClock is not used for the formatted timestamps. It just outputs the result of System.nanoTime(). It is used for %N or %nano in PatternLayout. If you are running on Java 9 or later, then the default clock is log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/SystemClo

Re: ETA for 2.12.3?

2021-12-21 Thread Remko Popma
Rodrigo, The logging PMC is voting on a 2.12.3 release now, so hopefully it can be announced in the next few days. Remko > On Dec 21, 2021, at 21:42, Rodrigo Merino > wrote: > > Hi all, > > Sorry to bother, since you must be tied up with lots of stuff... > > but real quick question: Is

Re: [ANNOUNCEMENT] Apache Log4j 2.15.0 Released

2021-12-10 Thread Remko Popma
Should this announcement also be sent to annou...@apache.org ? On Fri, Dec 10, 2021 at 7:08 PM Ralph Goers wrote: > The Apache Log4j 2 team is pleased to announce the Log4j 2.15.0 release! > > Apache Log4j is a well known framework for logging application behavior. > Log4j 2 is an upgrade to Lo

Re: garbagefreeThreadContextMap default

2021-08-04 Thread Remko Popma
It's slightly slower (less throughput). On Thu, Aug 5, 2021 at 5:44 AM Joshua S wrote: > Why isn't garbagefreeThreadContextMap enabled by default? > > That is, does it have any disadvantages? >

Re: Deadlock observed

2021-03-15 Thread Remko Popma
Leon, can you definitely rule out the possibility that there are any objects being logged which themselves call Log4j from their toString method? On Tue, Mar 16, 2021 at 7:28 AM Leon Finker wrote: > We are using default TimeoutBlockingWaitStrategy. I doubt it will > reproduce again. We have be

Re: Log4j2 Async Logging with LMAX Disruptor

2020-02-20 Thread Remko Popma
The queue being full means that the application is logging faster than the underlying appenders can handle. It’s not necessarily an indication that there’s a problem with the async loggers that sit in the middle. Things I’ve seen in the past that may cause the queue filling up: * using a custom

Re: Leveraging Gradle to detect invalid logging setups

2020-01-31 Thread Remko Popma
I am not very active on the Log4j2 project any more, but I remember how it always rubbed me that the build takes so long. I use Gradle wherever I can in my projects. It makes the build much faster. The problem I see with migrating the Log4j2 build to Gradle (even if all committers would buy in to t

Re: Non-String values in Thread Context Map (MDC)

2019-11-03 Thread Remko Popma
); > threadContextMap.putValue("key1", "stringValue"); > threadContextMap.putValue("key2", 0xDEADB33F); > > I can add this as a FAQ entry to log4j2-logstash-layout README, that said, > I believe it is more convenient to have this in the official Log4j 2 >

Re: Non-String values in Thread Context Map (MDC)

2019-11-03 Thread Remko Popma
deserves http://picocli.info > On Nov 3, 2019, at 17:31, Remko Popma wrote: > > Volkan, > > See https://issues.apache.org/jira/browse/LOG4J2-1648 for more details. > > Remko. > > (Shameless plug) Every java main() method deserves http://picocli.info > >>>

Re: Non-String values in Thread Context Map (MDC)

2019-11-03 Thread Remko Popma
Volkan, See https://issues.apache.org/jira/browse/LOG4J2-1648 for more details. Remko. (Shameless plug) Every java main() method deserves http://picocli.info > On Nov 3, 2019, at 13:57, Ralph Goers wrote: > > No. Our experience has shown that putting non-String values in ThreadLocals > ha

Re: Not able to get logging printout to console, email etc

2019-04-30 Thread Remko Popma
hel in advance. > I will be happy to contribute to the community in whatever way u can. For > example like reach out to developing countries to make people more computer > literate if I learnt the know how in log4j2. > > > Sent from Yahoo Mail for iPhone > > > On T

Re: Not able to get logging printout to console, email etc

2019-04-30 Thread Remko Popma
Folks, It’s all good, no worries. Sometimes email comes across different than intended, which is why we always assume good intentions and try to act in an empathetic fashion (https://www.apache.org/foundation/policies/conduct). Enjoy! ;-) Remko > On Apr 30, 2019, at 17:29, Karen Goh wrot

Re: OS

2019-04-17 Thread Remko Popma
Please tell us more about yourself and what you are investigating. Remko > On Apr 18, 2019, at 14:34, "liname...@outlook.com" > wrote: > > Hello, I am doing an investigation. > Does Windows Server 2019 support the following products: > > NTEventLogAppender (Apache Log4j) 1.2.15.1 > > Can i

Re: How to change the log4j2 log level of a running application without restarting?

2019-04-02 Thread Remko Popma
> On Apr 3, 2019, at 9:34, Alex O'Ree wrote: > > Isn't there a JMX/mbean based solution? Yes there is. This page has more detail: https://logging.apache.org/log4j/2.x/manual/jmx.html I remember there is an MBean API for changing the log level. > > On Tue, Apr 2, 2019 at 8:29 PM Ralph Goer

Re: Many threads "stuck" when using async loggers

2019-03-27 Thread Remko Popma
The first stack trace indicates that the application produces log events faster than they can be consumed. So let’s take a look at the components that sit downstream from the ringbuffer. You mentioned you’re using a RollingFileAppender. This should usually not be a bottleneck, depending on yo

Re: Application Server integration in Tomcat

2019-02-19 Thread Remko Popma
Hi Paul, Please try adding the log4j-web jar to the classpath: > INFO StatusLogger Log4j appears to be running in a Servlet environment, but > there's no log4j-web module available. If you want better web container > support, please add the log4j-web JAR to your web archive or server lib > dire

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Remko Popma
16, 2019, at 0:54, Remko Popma wrote: > > Ralph, > > I guess then the question becomes: how can the filter detect that a > particular event triggered a rollover? > > Remko. > > (Shameless plug) Every java main() method deserves http://picocli.info > >> On Feb

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Remko Popma
Ralph, I guess then the question becomes: how can the filter detect that a particular event triggered a rollover? Remko. (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 15, 2019, at 23:39, Ralph Goers wrote: > > I don’t think I understand this requirement. Why

Re: Announcing Apache Log4j Kotlin API 1.0.0

2018-12-30 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/announcing-apache-log4j-kotlin-api Please share on social media. On Sat, Dec 29, 2018 at 1:16 AM Matt Sicker wrote: > The Apache Logging Services project is pleased to announce the general > availability of the first release of our new Log4j Kotli

Re: Announcement: log4j2-logstash-layout v0.15 is released

2018-11-23 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j2-logstash-layout-v0-15 Please share on social media! Remko. (Shameless plug) Every java main() method deserves http://picocli.info On Saturday, November 24, 2018, Remko Popma wrote: > I’ll add an Apache blog entry announcement for this

Re: Announcement: log4j2-logstash-layout v0.15 is released

2018-11-23 Thread Remko Popma
I’ll add an Apache blog entry announcement for this as a community artifact when I have a chance. Remko. (Shameless plug) Every java main() method deserves http://picocli.info > On Nov 24, 2018, at 9:52, Gary Gregory wrote: > > Hi, > > You might want to create a PR for > https://logging.apac

Re: Have a patch to contribute to fix a lookup issue in Log4j 2

2018-09-26 Thread Remko Popma
Hi, Yes, contributions are very welcome! You already raised a JIRA ticket, that’s great. Next step is to provide a pull request with your fix. Please include unit tests and (if applicable) documentation updates. Please prefix commit messages with the JIRA ticket number. Log4j targets Java 7 b

Re: rEx pattern without class packaging information?

2018-09-12 Thread Remko Popma
Just looking at the docs I thought that adding the packaging information was a feature of the ‘xEx’ layout pattern, not ‘rEx’. (Shameless plug) Every java main() method deserves http://picocli.info > On Sep 13, 2018, at 8:16, Kevin Jung wrote: > > Hello, > > I wanted to log the root cause fi

Re: Third Party jars using log4j 1

2018-08-20 Thread Remko Popma
Use the log4j-1.2-api bridge jar. Make sure the legacy log4j-1.2.x jar is _not_ on the classpath (exclude it from maven dependencies). See also https://logging.apache.org/log4j/2.x/faq.html#which_jars and https://logging.apache.org/log4j/2.x/faq.html#exclusions Good luck! On Mon, Aug 20, 2018 at

Re: Verifying we are using async loggers

2018-08-16 Thread Remko Popma
1. With these traces can I confirm I'm using full asynchronous logging? Yes. We see AsyncLogger and not AsyncConfigLogger so all logging is happening asynchronously. 2. I've read that async logging starts just one thread, but here I see 2 (like when we mix sync and async logging).

Re: Questions about switching to async and other performance-related config

2018-08-07 Thread Remko Popma
n 8/6/2018 4:35 PM, Remko Popma wrote: >> If you have multiple threads that log quite a lot, async logging can make a >> big difference. >> If you don't log much, or if the logging is mostly happening on a single >> thread, I'd suggest sticking with synchronous lo

Re: Changing %c logger abbrevation - can't figure out how to achieve what I'm after

2018-08-07 Thread Remko Popma
Feel free to submit a patch/pull request with unit tests! ;-) (Shameless plug) Every java main() method deserves http://picocli.info > On Aug 8, 2018, at 0:34, Shawn Heisey wrote: > > Currently the logging pattern for Solr's log4j config contains "%c{1.}". > > When the logger is "org.apache.so

Re: Questions about switching to async and other performance-related config

2018-08-06 Thread Remko Popma
If you have multiple threads that log quite a lot, async logging can make a big difference. If you don't log much, or if the logging is mostly happening on a single thread, I'd suggest sticking with synchronous logging for its simplicity. Have you thought of any way to measure the performance diff

Re: [ANNOUNCE] Apache Log4j 2.11.1 released

2018-07-31 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j-2-11-1-released Please share on social media. On Tue, Jul 31, 2018 at 2:38 PM, Ralph Goers wrote: > > The Apache Log4j 2 team is pleased to announce the Log4j 2.11.1 release! > > Apache Log4j is a well known framework for logging application

Carter Kozak joined the Apache Logging PMC

2018-07-31 Thread Remko Popma
We are very happy that Carter Kozak joined the Apache Logging Services PMC. He has made many contributions to the development of Log4j 2 especially in the areas of concurrency, performance and memory management. Thanks Carter for all you did so far and all the best for your new role at Apache Loggi

Re: Odd problem starting program with log4j2 on Windows

2018-07-06 Thread Remko Popma
. > > > Ralph > > > > > >> On Jul 6, 2018, at 10:50 AM, Shawn Heisey wrote: >> >> On 7/5/2018 8:34 PM, Remko Popma wrote: >>> I found that the problem can be reproduced with this: >>> >>> new File(“file:C:\\temp\\some.f

Re: Odd problem starting program with log4j2 on Windows

2018-07-05 Thread Remko Popma
that is some weirdness with Java itself, and only on Windows. >> >> Ralph >> >>> On Jul 5, 2018, at 7:34 PM, Remko Popma wrote: >>> >>> I found that the problem can be reproduced with this: >>> >>> new File(“file:C:\\temp\\some.file”)

Re: Odd problem starting program with log4j2 on Windows

2018-07-05 Thread Remko Popma
I found that the problem can be reproduced with this: new File(“file:C:\\temp\\some.file”).toURI() If you print the above it shows: file:/C:/my/current/directory/file:C:/temp/some.file So, the configuration should not prefix the path with “file:”, but with “file:/“ (slash after the colon).

Re: Odd problem starting program with log4j2 on Windows

2018-07-03 Thread Remko Popma
Hi Shawn, Congrats with the Solr release and thanks for upgrading to log4j 2. What you describe sounds very odd indeed! If this is really a log4j issue, it should be possible to boil it down to a small Hello World-type project with a starter .bat file that demonstrates the issue. Will you

Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-25 Thread Remko Popma
(Re-posting since I did not see the link when sending from my yahoo mail account.) Blogged: https://blogs.apache.org/logging/entry/announce-apache-log4j-audit-1 Please share on social media! Thanks, -Remko On Mon, Jun 25, 2018 at 7:48 PM, Remko Popma wrote: > Blogged: [ANNOUNCE] Apache Lo

Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-25 Thread Remko Popma
: You could always wait until Monday to post it to get more views. :) On 22 June 2018 at 11:28, Remko Popma wrote: I should be able to blog this announcement tomorrow morning but now it’s bedtime for me. :-) (Shameless plug) Every java main() method deserves http://picocli.info > On Jun

Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-22 Thread Remko Popma
I should be able to blog this announcement tomorrow morning but now it’s bedtime for me. :-) (Shameless plug) Every java main() method deserves http://picocli.info > On Jun 23, 2018, at 0:39, Ralph Goers wrote: > > The Apache Log4j team is pleased to announce the Apache Log4j Audit 1.0.0 > r

Re: Recursive logging issue with curly braces in JSONLayout Object's toString()

2018-05-29 Thread Remko Popma
No, this is not a known issue. Please raise a ticket on the JIRA issue tracker for this. The more information about the bug, the faster it is likely to be resolved. (Adding a patch or a pull request with unit tests is ideal.) Remko (Shameless plug) Every java main() method deserves http://pic

Re: Version 1.2 - send one logger to a separate file

2018-05-04 Thread Remko Popma
I added a comment with example to https://issues.apache.org/jira/browse/SOLR-11453 On Fri, May 4, 2018 at 11:49 PM, Shawn Heisey wrote: > On 10/9/2017 5:56 PM, Remko Popma wrote: > > Log4j 1.x was declared End of Life in August 2015 ( > https://blogs.apache.org/foun

Re: Need to clear ThreadContext for each HTTP request?

2018-04-18 Thread Remko Popma
This is not something that can or should be automated imho. ThreadContext data disappearing automatically can be just as confusing to troubleshoot (or more so). Remko > On Apr 19, 2018, at 2:40, Gary Gregory wrote: > > On Tue, Apr 17, 2018 at 10:22 AM, Ralph Goers > wrote: > >> I have mixe

Re: Need to clear ThreadContext for each HTTP request?

2018-04-16 Thread Remko Popma
Very good question. Please be aware that Log4j will *not* clear the ThreadContext. Your concern that ThreadContext values may become visible to other threads because of Tomcat’s thread pool is a legitimate concern. It is a good idea to explicitly clear values when the application is done with

Re: How do I pass the thread context to another thread?

2018-04-14 Thread Remko Popma
At first glance your code looks okay. You can verify by printing the context data as part of the logging output. (Either in your test program or in configuration by adding %X in the PatternLayout pattern.) Remko (Shameless plug) Every java main() method deserves http://picocli.info > On Apr 1

Re: [ANNOUNCEMENT] (Corrected) Apache Log4j 2.11.0 released

2018-03-16 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j-2-11-released Please share on social media! On Sat, Mar 17, 2018 at 9:49 AM, Ralph Goers wrote: > The Apache Log4j 2 team is pleased to announce the Log4j 2.11.0 release! > > Apache Log4j is a well known framework for logging application b

Re: [ANNOUNCEMENT] (Corrected) Apache Log4j 2.11.0 released

2018-03-16 Thread Remko Popma
Blogged: Log4j 2.11 released : Apache Logging Services | | | | Log4j 2.11 released : Apache Logging Services | | | Please share on social media! On Saturday, March 17, 2018, 9:49:22 AM GMT+9, Ralph Goers wrote: The Apache Log4j 2 team is pleased to announce the Log4j 2.11

Re: Property Substitution - lookup default value?

2018-03-01 Thread Remko Popma
Looking at the below JIRA tickets, that is supposed to be fixed in 2.8. What Log4j version are you using? Please see https://issues.apache.org/jira/browse/LOG4J2-1589 https://issues.apache.org/jira/browse/LOG4J2-1243 You can try modifying (Shameless plug) Every java main() method deserves http

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Remko Popma
s for the thoughts /feedback. I was just curious to know what you > would think of such a design for apps that needs to guaranty ordering. > Thanks! > >> On Tue, Feb 20, 2018 at 2:36 PM, Remko Popma wrote: >> >> To come back to our questions, what version of Log4j are you

Re: Log4j2 RollingFileAppender message not in order?

2018-02-20 Thread Remko Popma
To come back to our questions, what version of Log4j are you using? Are you seeing log entries that are out of order in the same thread? (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 21, 2018, at 7:15, Matt Sicker wrote: > > On 20 February 2018 at 11:32, Benja

Re: Best approach for sub-millisecond timestamps?

2018-02-10 Thread Remko Popma
Oops, for some reason I misread that link. It’s on the site already. Good. On Sun, Feb 11, 2018 at 10:11 Remko Popma wrote: > Alfred, > > Sub-milli time stamps have been implemented and will be in the next > release. Note that this uses standard Java APIs and will only work on

Re: Best approach for sub-millisecond timestamps?

2018-02-10 Thread Remko Popma
Alfred, Sub-milli time stamps have been implemented and will be in the next release. Note that this uses standard Java APIs and will only work on Java 9 and higher. The next release is feature complete and will come out as soon as the release manager has time to do the work. As Gary pointed o

Re: log event pojo from log file/ parse file back to log event

2018-02-02 Thread Remko Popma
If you want to reconstruct log event objects from the log file, we recommend the JSON layout. The log file will contains more details than with PatternLayout and is easiest to parse back to objects. Remko (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 3, 2018,

Re: Setting Log4jContextSelector programmatic in Main application

2018-01-15 Thread Remko Popma
The Java language spec says that static blocks and static fields are initialized in textual order. https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12. Are you seeing something different? (Shameless plug) Every java main() method deserves http://picocli.info > On Jan 15, 20

Re: [External] Re: Log4j2 Async logger fallback method

2018-01-03 Thread Remko Popma
the events will be written, right? > That means that only events of type Info, debug and trace could be lost, but > none of the higher levels like error, warn and severe, right? > > Kind regards, > Christian > > On 22.12.17, 01:53, "Remko Popma" wrote: > >

Re: Remote Logging

2017-12-21 Thread Remko Popma
You can also check out and build that module yourself. The repository is here: https://github.com/apache/logging-log4j-tools It is ready for release, there are no outstanding tickets on that module. (Shameless plug) Every java main() method deserves http://picocli.info > On Dec 12, 2017, at 1

Re: Log4j2 Async logger fallback method

2017-12-21 Thread Remko Popma
Yes by default the application thread will block until a slot becomes available in the queue. Yes this is configurable: see https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactory.java (Shameless plug) Every

Re: How to build the Routing Appender with the ConfigurationBuilder

2017-12-21 Thread Remko Popma
I suppose that was done for the streams module, to allow installing Log4j2 on jdbc drivers. (Shameless plug) Every java main() method deserves http://picocli.info > On Dec 22, 2017, at 4:55, Ralph Goers wrote: > > This one has me stumped. I don’t recall when OutputStreamAppender or > WriterA

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Remko Popma
explains it. > Useful to know about 2031 though. > > Thanks > Benjamin > >> On Thu, Dec 14, 2017 at 2:54 PM, Remko Popma wrote: >> >> Are you using Log4j 2.10? >> The reason I’m asking is that the 2.10 release contains a fix for >> https://issues.apache

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Remko Popma
Are you using Log4j 2.10? The reason I’m asking is that the 2.10 release contains a fix for https://issues.apache.org/jira/browse/LOG4J2-2031. Prior to 2.10, there was a possibility that log events ended up out of order in the log when you’re using async loggers or async appender and the append

Re: log4j reduction of repeated message

2017-12-13 Thread Remko Popma
I believe this is possible, but it’s not trivial. See the discussion here: https://issues.apache.org/jira/browse/LOG4J2-1630 (Shameless plug) Every java main() method deserves http://picocli.info > On Dec 14, 2017, at 2:18, Carlos Terron Bueno wrote: > > rsyslog has an option, > $RepeatedMsgR

Re: monitorInterval not working in tomcat

2017-12-03 Thread Remko Popma
Enric, You should be able to remove Log4j-1.2.14 after adding log4j-1.2-api-2.6.2.jar (or log4j-1.2-api-2.4.jar). They provide the same API to the application. The difference is that log4j-1.2-api-2.x.jar uses log4j-core-2.x as its implementation, which is what you want. (Shameless plug) Ev

Re: Flushing async appenders

2017-11-28 Thread Remko Popma
re either lost of are not flushed. > This happens even if I change the console to go to a file. > > Thank you, > > Laurent Hasson > Co-Founder and CTO > CapsicoHealth Inc. > > > Research has shown that capsaicin, the substance that gives hot red peppers > (or c

Re: Flushing async appenders

2017-11-23 Thread Remko Popma
That is strange: with the async appender (and also with async loggers), Log4j2 should automatically flush the I/O buffer when the async queue is empty... You may have found an issue. Can you raise a JIRA ticket for this? Meanwhile, you can add attribute immediateFlush="true" to your Rolling file

Re: new feature proposal - microloggers

2017-11-23 Thread Remko Popma
Cool! Stay in touch: ideas are always welcome! On Fri, Nov 24, 2017 at 3:41 AM, Enric Jaen wrote: > I will try it and let you know > best regards > Enric >En jueves, 23 de noviembre de 2017 12:37:25 GMT, Remko Popma < > remko.po...@gmail.com> escribió: > > You k

Re: new feature proposal - microloggers

2017-11-23 Thread Remko Popma
You know, I think we may already have something very similar... Take a look at the second example under Map Filter: https://logging.apache.org/log4j/2.x/manual/filters.html#MapFilter If you use a RegexFilter ( https://logging.apache.org/log4j/2.x/manual/filters.html#RegexFilter) would that meet yo

Re: log4j vs log4jextras v1.x

2017-11-17 Thread Remko Popma
Not sure, you’d have to try. But be aware that Log4j 1.2 has been End of Life for 2 years now and is known to be broken on Java 9. We recommend everyone to upgrade to Log4j2. Log4j2 has better performance and can be configured to be garbage free. Just switching to Log4j2 is likely to speed u

Re: Version 1.2 - send one logger to a separate file

2017-10-09 Thread Remko Popma
Log4j 1.x was declared End of Life in August 2015 (https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces). Also, Log4j 1.2 is known to be broken on Java 9 (https://blogs.apache.org/logging/entry/moving_on_to_log4j_2). Other than that, the people in this community

Re: Do you have any plans to instrument `log4j2` with metrics?

2017-09-30 Thread Remko Popma
Ralph beat me to it. :-) We could add counters to various components and make those counters visible via JMX. Surely the libraries you mention know how to consume metrics from a JMX data source. To me a key point would be to avoid impacting performance while updating counters in multi-threade

Re: AbstactDatabase appender issue with AsyncLogger

2017-09-28 Thread Remko Popma
I'm away from my PC but it sounds like Log4j2 needs to take a snapshot of the log event before adding it to the list. (Shameless plug) Every java main() method deserves http://picocli.info > On Sep 28, 2017, at 17:45, Tolga Kavukcu wrote: > > Hello, > > I use log4j2 AsycLogger Implementation

Re: Asynchronous logger and thread-local appender

2017-09-24 Thread Remko Popma
Piotr, I agree that implementing custom Log4j2 context injector to solve this can be quite complex. It's a good idea to look at using AsyncAppender with an alternative queue. DisruptorBlockingQueue and JCToolsBlockingQueue are good options. We haven't done extensive performance analysis but i

Re: [ANNOUNCE] Apache Log4j 2.9.0 released

2017-08-30 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j-2-9-released (Shameless plug) Every java main() method deserves http://picocli.info > On Aug 31, 2017, at 9:26, Ralph Goers wrote: > > The Apache Log4j 2 team is pleased to announce the Log4j 2.9.0 release! > > Apache Log4j is a well known

Re: HELP! About log4j2 delete action configuration

2017-08-28 Thread Remko Popma
I can't see any problem with the configuration. Can you switch on status logging? Please add to the top of your configuration file. That will print internal Log4j2 status log messages to the console during rollover. Hopefully that will give some insight into what is happening. Remko (Sha

Re: Log4j2 - setting programatically the env variable

2017-08-21 Thread Remko Popma
Q1. Why is the log4j2 framework starting before the servlet context is called ? Not sure. There could be some logging happening in a static initialization block. This static block is called when its class is loaded, which would cause Log4j2 to initialize itself. You can see that Log4j2 tries to fi

Re: log4j2.properties file locked in Tomcat 8.0

2017-08-11 Thread Remko Popma
Also, what is your Log4j2 configuration? Some file appender configurations result in file locking. (Shameless plug) Every java main() method deserves http://picocli.info > On Aug 11, 2017, at 17:36, Bogdan wrote: > > Hello again, > > I have tested with the latest version of log4j2, 2.8.2 and

Re: log4j2.properties file locked in Tomcat 8.0

2017-08-11 Thread Remko Popma
Is this on Windows? Have you tried to find what file exactly is being locked with a tool like Process Explorer from SysExternals (now Microsoft): https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer (Shameless plug) Every java main() method deserves http://picocli.info > On

Re: FailoverAppender is not starting

2017-07-10 Thread Remko Popma
ce it couldn’t create the Appender). > > Ralph > >> On Jul 10, 2017, at 3:58 PM, Remko Popma wrote: >> >> Your root logger is referencing the Failover appender directly. It should >> reference the RollingFile appender instead. >> >> Remko >> &

Re: FailoverAppender is not starting

2017-07-10 Thread Remko Popma
Your root logger is referencing the Failover appender directly. It should reference the RollingFile appender instead. Remko (Shameless plug) Every java main() method deserves http://picocli.info > On Jul 11, 2017, at 4:20, Vina Martin wrote: > > RollingFile -

Re: Custom actions on rollover

2017-05-19 Thread Remko Popma
e know if you need help. > > On 19 May 2017, 5:25 AM +0530, Remko Popma , wrote: > > Some (very early stage) thinking on that topic is here: > https://issues.apache.org/jira/browse/LOG4J2-1198 > > > > This may not be easy because there are quite a few subtleties with > r

Re: How can I use log4j 2 if there are both log4j and log4j 2 jars included in classpath?

2017-05-19 Thread Remko Popma
Instead of activemq-all, use only the parts from activemq that you need ( https://mvnrepository.com/artifact/org.apache.activemq). On Fri, May 19, 2017 at 6:12 PM, Sigmond Hola wrote: > We have a web project want to use log4j 2 for logging. > > But after I add > >- log4j-api-2.x.jar >- l

Re: Custom actions on rollover

2017-05-18 Thread Remko Popma
Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198 This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover). Remko (Shameless plug) Every java main() method deserves h

Re: AW: Trailing space on loglevel in properties file not trimmed

2017-04-24 Thread Remko Popma
on that uses such properties should still validate the input. An > because the levels are a fixed set of values it would be good to trim them > after reading and before initializing the logger with the value. > > -Ursprüngliche Nachricht- > Von: Remko Popma [mailto:remko.po...@gm

Re: Trailing space on loglevel in properties file not trimmed

2017-04-24 Thread Remko Popma
I believe that's how java.util.Properties work but I can imagine this can be surprising... Remko (Shameless plug) Every main() method deserves http://picocli.info > On Apr 24, 2017, at 21:24, Michael Lück wrote: > > Hello all, > > > > I just realised that a trailing space on a level confi

Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-18 Thread Remko Popma
8, Ankit Agarwal > wrote: > > > > >On Monday, April 10, 2017 5:20 PM, Remko Popma > wrote: > > >> If you enable internal Log4j2 logging with >> at the top of your configuration, then you should see internal Log4j2 >> logging on the console

Re: anomalies running log4j v 2.2 on Tomcat

2017-04-18 Thread Remko Popma
I can partially answer that. The LoggerContext name has changed a few times. I actually thought it's the other way around and the older versions of Log4j2 use a web app name-based LoggerContext name. It turned out that some web containers generate web context names that are multiple lines and co

Re: Max index limit in DefaultRolloverStrategy

2017-04-11 Thread Remko Popma
Sorry to hear that! You are right that the docs currently don't mention the default value for the max attribute. We should fix the docs. Can I ask you to raise a Jira for this? As for why not a large default value, there is a performance impact: all files within the range need to be renamed (bump

Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-10 Thread Remko Popma
If you enable internal Log4j2 logging with at the top of your configuration, then you should see internal Log4j2 logging on the console. It should show details of what happens during a rollover. Can you post that output? Sent from my iPhone > On Apr 11, 2017, at 4:07, Ankit Agarwal > wrote

Re: [ANN] Log4j 2.8.2 released

2017-04-08 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j-2-8-2-released On Sun, Apr 9, 2017 at 1:53 AM, Matt Sicker wrote: > The Apache Log4j 2 team is pleased to announce the Log4j 2.8.2 release! > > Apache Log4j is a well known framework for logging application behavior. > Log4j 2 is an upgrade t

Re: Programmatically determine if logger is "OFF"

2017-03-30 Thread Remko Popma
I think Gary rightly points out that this may not be as trivial as it seems. Personally I am not a fan of API changes to add convenience methods. Remko Sent from my iPhone > On Mar 31, 2017, at 8:20, Gary Gregory wrote: > > The best way to get this cooking is to create a JIRA and attach a

Re: About performance

2017-03-30 Thread Remko Popma
ch for the log message string in that class. > > > Regards > >> On Thu, Mar 30, 2017 at 1:49 PM, Remko Popma wrote: >> >> >> >> Sent from my iPhone >> >>> On Mar 30, 2017, at 16:24, Pietro Galassi >> wrote: >>> &g

Re: About performance

2017-03-30 Thread Remko Popma
d if you want good performance. > > > Regards. > > >> On Wed, Mar 29, 2017 at 5:49 PM, Remko Popma wrote: >> >> Pietro, >> >> The performance impact of logging location information is massive. >> See >> https://logging.apache.or

Re: About performance

2017-03-29 Thread Remko Popma
Pietro, The performance impact of logging location information is massive. See https://logging.apache.org/log4j/2.x/performance.html#asyncLoggingWithLocation You can increase logging speed by ~80x by not logging location information. If you follow the conventions that each class has its own logg

Re: Compression of rolled files : performance issue when lots of JVMs are using timed based policy

2017-03-24 Thread Remko Popma
> What if a configuration could contain conditional statements? For instance: > > > > > > > > > > > > > DayOfWeek="*" /> > > > > > Cheers > >>

Re: Compression of rolled files : performance issue when lots of JVMs are using timed based policy

2017-03-24 Thread Remko Popma
ards, >> Anthony >> >> >> 2017-03-23 13:15 GMT+01:00 Anthony Maire : >> >>> Ok, I will open a jira ticket and provide a PR. >>> >>> Thanks for your input. >>> >>> Le 23 mars 2017 13:08, "Remko Popma"

Re: Compression of rolled files : performance issue when lots of JVMs are using timed based policy

2017-03-23 Thread Remko Popma
ed to the triggering policy and not to the rolling > strategy. > > So the best thing to do is to add some property on the timed base > triggering policy and let that class handle all the logic and delay the > triggering itself instead of the compression. > > Are you OK with that?

Re: Compression of rolled files : performance issue when lots of JVMs are using timed based policy

2017-03-22 Thread Remko Popma
> On Mar 23, 2017, at 1:06, Anthony Maire wrote: > > Thanks for these answers > > @Ralph : that was the kind of idea I had in mind : changing the > RollingFileManager.asyncExecutor to be a ScheduledThreadPoolExecutor, and > based on some configuration, submitting task to be executed after a ran

Re: using log4j in classloaders and JMX

2017-03-13 Thread Remko Popma
The Configuration name is not used to register the LoggerContext. JMX MBeans for LoggerContext are registered with unique names: their hashcode is appended to the name. The first part of the name depends on what kind of application it is. I believe that for web apps we try to use a meaningful

Re: EDT Transition?

2017-03-13 Thread Remko Popma
Ron, Shishir, all, I've started to look at the issue. Remko Sent from my iPhone > On Mar 14, 2017, at 8:34, DiFrango, Ronald > wrote: > > Matt, > > It most certainly is and my college Shishir has updated the ticket below with > some details of what he thinks the root cause of the problem

Re: [ANNOUNCEMENT] Apache Log4j 2.8.1 released

2017-03-02 Thread Remko Popma
Blogged: https://blogs.apache.org/logging/entry/log4j-2-8-1-released On Fri, Mar 3, 2017 at 2:27 PM, Ralph Goers wrote: > The Apache Log4j 2 team is pleased to announce the Log4j 2.8.1 release! > > Apache Log4j is a well known framework for logging application behavior. > Log4j 2 is an upgrade

Re: Profile controlled filtering

2017-02-27 Thread Remko Popma
One option is to create a custom Log4j2 Filter. Your custom Filter would only be "active" if it detects it's in the correct environment, otherwise it would return NEUTRAL from all `filter(...)` methods. CompositeFilter is final so you can't subclass it but perhaps you can create a wrapper inst

Re: CPU Utilization: log4j 2.6 and great

2017-02-13 Thread Remko Popma
s >> is going on. >> >> One question, though what would you use in place of the >> DefaultRolloverStrategy and max? >> >> Ron DiFrango >> >> On 2/13/17, 6:43 PM, "Remko Popma" wrote: >> >> I've seen cases where the &q

  1   2   3   4   5   >