[ 
https://issues.apache.org/jira/browse/CXF-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15424712#comment-15424712
 ] 

Christian Schneider commented on CXF-7000:
------------------------------------------

This exact sequence will not be possible or at least difficult with the new 
logging feature.
You could eventually programmatically change the log4j config to achieve the 
same but I would not recommend it.

If we need to turn logging on and off programmatically during  a sequence of 
code then we could introduce a bus or service property or even a system 
property. The logging could then evaluate the property before doing the 
logging. I am not sure if it is worth the effort thought. Normally the more 
coarse grained log4j approach was good enough for me.

Generally I am not so much sold on the approach above as it means you write 
code like bus.setLiveLogging(false) that is only needed for a short time while 
debugging and later remove it. This always has the risk that this code is 
forgotten and left in there even in production. This is why I looked for a way 
to switch logging on and off that allows the code to remain the same during 
debugging and production. This also has the advantage that you can enable 
"debug logging" of messages in production.

So depends on you guys if we want to add a property. I am not against it but 
also do not see a big need for it. 

> Allow logging to be enabled on-the-fly
> --------------------------------------
>
>                 Key: CXF-7000
>                 URL: https://issues.apache.org/jira/browse/CXF-7000
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core, logging
>    Affects Versions: 3.1.7
>            Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to