Re: log4j2 JSONLayout with AsyncLogger not outputting properties

2018-05-11 Thread Carter Kozak
I think this issue is tracked here: https://issues.apache.org/jira/browse/LOG4J2-2312 On Fri, May 11, 2018 at 9:12 PM, Franz Wong wrote: > I also got the same issue when I used AsyncLoggerContextSelector. But if I > use the default selector, but changing the logger to and > , then the log genera

Re: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Carter Kozak
> I see you say performance in RollingRandomFile is 20-200% better than > RollingRandom Do you mean "RollingRandomAccessFile is 20-200% better than RollingFile"? If so, that is correct. If you are using asynchronous logging, I would recommend setting immediateFlush="false" (the default value is "

Re: Fwd: Travel Assistance for ApacheCon NA Las Vegas 2019 now open.

2019-06-30 Thread Carter Kozak
Hi Folks, I've registered to attend ApacheCon Vegas, hoping to see you there! -ck On Sun, May 19, 2019, at 14:38, Matt Sicker wrote: > Hello everyone! This year, I know of at least two submissions to > ApacheCon Las Vegas that are related to Log4j. While the schedule > hasn't been confirmed or p

Re: How to configure ObjectMapper of Log4j2 JSON Layout

2019-07-12 Thread Carter Kozak
I like the idea of an ObjectMapperFactory plugin point. That gives us a cleaner builder API on JsonLayout where we can potentially pass in a supplier for an ObjectMapper instance from programmatic configuration. On Fri, Jul 12, 2019, at 19:10, Matt Sicker wrote: > And by plugin, see for example

Re: Changing the Attributes on a RollingAppender

2019-08-22 Thread Carter Kozak
Have you considered using a routing appender[1]? It can write to a specific file based on jvm system properties, thread context (MDC), or any other pattern parameter. 1. https://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender On Thu, Aug 22, 2019, at 08:49, Fred Eisele wrote:

Re: Getting the most out of the Log4j 2 API

2020-01-01 Thread Carter Kozak
Fantastic post, thanks Ralph. I think this information would be great on the official site as well. -ck > On Jan 1, 2020, at 7:02 PM, Ralph Goers wrote: > > https://www.ralphgoers.com/post/getting-the-most-out-of-the-log4j-2-api >

Re: Need to override the Append method of the KafkaAppender

2020-01-09 Thread Carter Kozak
Can you write a custom layout which wraps another layout and implements that code on the result? Encapsulation should be easier to support than extension. -ck > On Jan 9, 2020, at 8:31 AM, buks...@gmail.com wrote: > > Hi Ralph, > I cant understand where the hook for the PatternConverter would

Re: Leveraging Gradle to detect invalid logging setups

2020-01-31 Thread Carter Kozak
This is an interesting idea. I'm personally much more familiar with gradle than I am with maven, and have worked on similar gradle plugins to avoid incompatible logging dependencies (I have a few horror stories in this department). Having a standard in place to prevent classpath issues would ab

Re: Log4j2 Async Logging with LMAX Disruptor

2020-02-20 Thread Carter Kozak
Is there any chance you could provide a thread dump as well, even if internal details are redacted, in addition to the configuration? On Thu, Feb 20, 2020, at 19:36, Remko Popma wrote: > The queue being full means that the application is logging faster than the > underlying appenders can handle.

Re: Custom JSONLayout

2020-08-12 Thread Carter Kozak
Hi Naz, Volkan has contributed a fantastic json template layout that I expect will do what you want, however it has not been released yet. https://github.com/apache/logging-log4j2/pull/335 This discussion from the mailing list provides several options which may be relevant to your use case: htt

Re: Logging works fine on one machine but not on the other

2020-10-09 Thread Carter Kozak
A case of classpath roulette :-) Would you mind filing a Jira issue for better validation/messaging? https://issues.apache.org/jira/projects/LOG4J2 I've written similar validation for slf4j bindings elsewhere that we may be able to leverage (though the general case has many edge cases that I have

Re: JDK 11 and StackWalker Performance Issue

2020-12-18 Thread Carter Kozak
If we made a change that results in degraded performance, we should investigate and fix it. I imagine this would have an impact on application startup time even if all loggers are loaded once as static fields. Can you confirm the log4j2 version that you're using in this example? It appears that

Re: Deadlock observed

2021-03-15 Thread Carter Kozak
This sounds a lot like an issue I discussed with the lmax-disruptor folks here: https://github.com/LMAX-Exchange/disruptor/issues/307 I ended up switching my services to log synchronously rather than enqueue when the buffer is full, which can produce events out of order, however we log into a str

Re: Deadlock observed

2021-03-15 Thread Carter Kozak
I'm wrong) > > The main question here is : why do you need to log from the logging thread ? > > Best regards, > Anthony > > > Le lun. 15 mars 2021 à 13:50, Carter Kozak a écrit : > > > This sounds a lot like an issue I discussed with the lmax-disruptor

Re: Program hangs when terminating on v14.1

2021-08-03 Thread Carter Kozak
I believe I fixed this on the 2.x branch and master a few months ago, it should be available in our 2.15 release (likely in the next month). I don’t have the ticket link available from my phone, I can link it later in the day when I have a moment. -ck > On Aug 3, 2021, at 2:03 AM, Laurent Hass

Re: Program hangs when terminating on v14.1

2021-08-03 Thread Carter Kozak
Here it is: https://issues.apache.org/jira/browse/LOG4J2-3102 On Tue, Aug 3, 2021, at 07:30, Carter Kozak wrote: > I believe I fixed this on the 2.x branch and master a few months ago, it > should be available in our 2.15 release (likely in the next month). I don’t > have the ti

Re: Unit testing custom log event factory fails intermittently

2021-09-29 Thread Carter Kozak
I think the LoggerContextRule can fail to apply the provided configuration if another thread happens to access a logger (re-initializing the default config) after the rule has stopped the old context, but before it has initialized the new one. We may be able to update it with a loop so it tries

Re: Is there a way to log time format in miliseconds

2021-09-30 Thread Carter Kozak
You should be able to use include the following in your pattern: %d{UNIX_MILLIS} >From the docs: >https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout Best, -ck On Thu, Sep 30, 2021, at 17:55, Niranjan Rao wrote: > Greetings, > > On log4j2. > > I have tried obvious searches a

Re: is it save to call StrSubstitutor.replace(final LogEvent event, final, String source) with Log4j 2.17.0

2021-12-22 Thread Carter Kozak
This is a great question, and something I'm working on documenting today. The relevant change in 2.17.0 is https://github.com/apache/logging-log4j2/commit/806023265f8c905b2dd1d81fd2458f64b2ea0b5e Outside of evaluating the configuration itself, we no longer recursively evaluate substitution resu

Re: is it save to call StrSubstitutor.replace(final LogEvent event, final, String source) with Log4j 2.17.0

2021-12-23 Thread Carter Kozak
I've put together a more thorough document here: https://github.com/apache/logging-log4j2/blob/release-2.x/docs/2.17.0-interpolation.md On Wed, Dec 22, 2021, at 11:38, Carter Kozak wrote: > This is a great question, and something I'm working on documenting today. > > The

Re: System logger and unexpanded placeholders

2022-01-20 Thread Carter Kozak
Ah! I hadn’t been able to recall where this was reported, but I fixed it on Monday as LOG4J2-3345 :-) -ck > On Jan 20, 2022, at 03:57, Travis Spencer wrote: > > Added a ticket with a sample project attached which reproduces the issue: > https://issues.apache.org/jira/browse/LOG4J2-3355 > >>

Re: PatternLayout Vs JsonTemplateLayout/JsonLayout Performance Comparision

2022-11-16 Thread Carter Kozak
his sentiment, but we should remember that some users have a different set of constraints and requirements. Carter Kozak - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org