> 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
I believe he's referencing this:
https://logging.apache.org/log4j/2.x/manual/extending.html#Custom_ContextDataInjector
On 22 March 2017 at 14:48, Christian wrote:
> Thanks Matt and Ralph!
>
> I also thought if it is possible to use the %replace pattern for this
> purpose. I think I will give th
Thanks Matt and Ralph!
I also thought if it is possible to use the %replace pattern for this
purpose. I think I will give this a try.
@Ralph: What do you mean with "Data Injection stuff"? Do you have any
link a documentation with information about this?
Best regards,
Christian
Am 22.03
There's the %notEmpty{} pattern which only outputs its pattern if all its
variables are not empty. If you want a default value, then perhaps combine
that with %replace{%notEmpty{%X{userNumber}}}{^$}{fallback value} or
something similar. You shouldn't need the %notEmpty{} bit if you don't add
anythi
Thank you, that seemed to be it. I removed the additivity from appender-ref
tags and the problem went away.
I guess I got bit by a strangely worded error message. The way it was
stated it seemed to say that I'd missed putting additivity on some
appender-ref rather than having put one that didn
If userNumber does not exist in the ThreadContext then nothing will be included
in the display. I am not aware that we have implemented any way to specify a
default value for this, but with the Data Injection stuff that was added a few
releases ago it might be possible.
Ralph
> On Mar 22, 201
Hi all,
with the pattern /%X{userNumber}/ I am able to display a value I stored
in the thread context.
Is there any possibilty to display an alternative value if nothing was
found and/or an empty value was stored under the key I'm suing (in this
case /userNumber/).
Thanks and best regards
If the v1 config is anything like the v2 config, then you only need
additivity="false" on the logger element (in this case, the
element). The appender-ref element has nothing to do with additivity.
On 22 March 2017 at 12:26, bmelloni wrote:
> I thought I understood additivity, but apparently I
I thought I understood additivity, but apparently I don't. I am using
log4j-1.2.17.jar.
After getting a bunch errors like the one in the subject I kept adding
additivity tags, but nothing stopped the errors.
What is the correct syntax to send the packages (and subpackages/classes)
that have ap
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 random
delay. However with this kind of approach, special treatment
These are separate JVMs, so having a single executor would be of no help.
I believe the only way to do what you are asking for is to add configuration so
that the asynchronous thread has a semi-random delay when it starts.
Ralph
> On Mar 22, 2017, at 7:58 AM, Greg Thomas wrote:
>
>> One commo
>One common issue we have with that framework (and I assume we can have the
>same with log4j2) is that all of our JVMs (we can have more than 50 JVMs on
>the same server in production) roll their file at midnight.
>
>When this happens, the system became often not usable for a few seconds
>because o
I think something like the following is possible
Means that you specify that the rollover should happen at 12:00 but the
seconds are kind of randomized via Property Substitution or so.
Not sure if date:seconds works but alternatively you could use system or
env variables for it i guess.
Br,
Davi
I'm not sure if the feature is in log4j, but that reminds me of the jenkins
feature where you can do the same. I'd take a look at the cron triggering
policy docs first to see what's already possible. You can also combine that
with some scripts, so there's certainly a way to do it using current
func
Hi
We are currently using another logging framework in production, but I'm
pushing to change it for log4j2.
One common issue we have with that framework (and I assume we can have the
same with log4j2) is that all of our JVMs (we can have more than 50 JVMs on
the same server in production) roll th
15 matches
Mail list logo