also, would a FailoverAppender with the external appender being the primary be
a solution?
On Wednesday, March 25, 2020, 10:58:16 AM EDT, EDMONDO SENA
wrote:
1) Do the external appenders come and go, or do we know ahead of time if they
are available?
No, come and go!
2) Would a R
Matt, thanks for chiming in. I was running some test cases, and I saw that
exact behaviour: lost messages when doing the ctx.update().
On Wednesday, March 25, 2020, 10:58:17 AM EDT, Matt Sicker
wrote:
Appenders shouldn't be directly modified like that as it would lead to
a loss of lo
Matt's suggestion works. You can make a routing appender that will switch
between appenders under program control. Example of something that switches
between two different ConsoleAppenders
Configuration:
Are you saying that you are sending the events to one location and want to
reconfigure to send them to another location? The only safe way to do that
without losing logging events is to reconfigure - i.e. create a new
configuration that replaces the prior configuration. To do what you are askin
we need only remove all appenders because not necessary in that case.
On 2020/03/25 15:03:26, Matt Sicker wrote:
> Take a look at this:
> https://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender
>
> This appender is extremely flexible for that use case. I'd recommend
> avoid
Take a look at this:
https://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender
This appender is extremely flexible for that use case. I'd recommend
avoiding the use of an inline script (JavaScript or Groovy) unless
absolutely necessary as that's likely the slowest routing mechanis
Appenders shouldn't be directly modified like that as it would lead to
a loss of log events during that operation. The appropriate ways to
programmatically initialize configuration is documented here:
https://logging.apache.org/log4j/2.x/manual/customconfig.html#Configurator
On Wed, 25 Mar 2020 at
1) Do the external appenders come and go, or do we know ahead of time if they
are available?
No, come and go!
2) Would a RoutingAppender() that knows if external or internal logging is to
be done and then routes messages to the appropriate appender a solution?
More or less yes.
On 2020/03
ah. a couple of solutions present themself (and hopefully someone more
conversant with log4j4 can chime in).
Would a RoutingAppender() that knows if external or internal logging is to be
done and then routes messages to the appropriate appender a solution?
Do the external appenders come and go,
Can you explain me this behaviour?
Map appenders = config.getAppenders();
appenders.clear();*** WORKING ***
Map loggers = config.getLoggers();
loggers.clear();*** GOES IN EXCEPTION DOESN'T WORK!!
On 2020/03/25 14:41:30, EDMONDO SENA wrote:
> In order to disable loc
In order to disable local logging when the external logging is enabled.
So, remove all local appenders and disable local logging for re-enabling the
delivery towards another system to run-time.
On 2020/03/25 14:29:26, Doug Wegscheid wrote:
> upon examination, I see that clearAppenders() is no
upon examination, I see that clearAppenders() is not public, so that won't
work.
There is probably a way to do what you want, if you can tell us why you need to
clear the appenders.
On Wednesday, March 25, 2020, 10:23:38 AM EDT, EDMONDO SENA
wrote:
Can you explain me how can i do it
Can you explain me how can i do it?
Regards.
On 2020/03/25 14:18:03, Doug Wegscheid wrote:
> you are trying to clear the list of appenderRefs. Are you trying to call
> clearAppenders() instead of clear()?
>
> On Wednesday, March 25, 2020, 10:03:27 AM EDT, EDMONDO SENA
> wrote:
>
you are trying to clear the list of appenderRefs. Are you trying to call
clearAppenders() instead of clear()?
On Wednesday, March 25, 2020, 10:03:27 AM EDT, EDMONDO SENA
wrote:
Why this instruction goes in UnsupportedOperationException?
List value = loggerConfig.getAppenderRefs();
v
14 matches
Mail list logo