[ 
https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633183#action_12633183
 ] 

Kiran Ayyagari commented on DIRSERVER-1186:
-------------------------------------------

Essence of a chat conversation with Emmanuel regarding this feature

Its not possible to change the logger level on the fly with slf4j cause its 
just a wrapper. Moreover changing the log level dynamically by the library is 
not a good practice - http://www.slf4j.org/faq.html#configure_logging

There are two possible approaches to solve this

 1. Using a custom logger implementation - This requires changes to the code at 
all places 
     hence may not be a recommended approach

 2. Storing the log info in a StringBuilder in the Session - 

      if the LOG-REQUEST control is set,

         then inject a new <messageId, StringBuilder> in the session
  
            for each part of the server you want to create some logs for the 
user,
   
               if there is a <MessageId, buffer> in the session,
     
                then get the buffer and add some logs into it


> Trace control and request level logging
> ---------------------------------------
>
>                 Key: DIRSERVER-1186
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1186
>             Project: Directory ApacheDS
>          Issue Type: New Feature
>    Affects Versions: 1.5.4
>            Reporter: Alex Karasulu
>             Fix For: 1.5.5
>
>
> Would be really nice to have a debug level control for tracing requests with 
> different log levels.  This way logging can be off for the whole system while 
> turned on just to trace an issue with a specific request.  Would also be nice 
> to send back the logging information to the client in the response payload 
> even on success some way.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to