You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Alex Karasulu (JIRA)" <ji...@apache.org> on 2008/06/10 22:23:45 UTC

[jira] Created: (DIRSERVER-1186) Trace control and request level logging

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
            Reporter: Alex Karasulu
             Fix For: 1.5.4


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.


Re: [jira] Created: (DIRSERVER-1186) Trace control and request level logging

Posted by Alex Karasulu <ak...@apache.org>.
On Tue, Jun 10, 2008 at 4:33 PM, Howard Chu <hy...@symas.com> wrote:

> Alex Karasulu (JIRA) wrote:
>
>> 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
>>             Reporter: Alex Karasulu
>>              Fix For: 1.5.4
>>
>>
>> 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.
>
> Perhaps you should write a spec for an "extended diagnostics" control that
> can be attached to a request, causing more information to be returned to the
> client. In general we don't like to expose too much information in protocol
> responses because that can give away too much knowledge to an attacker. But
> I guess if you have access controls restricting who can use a particular
> control, it would be OK.
>

That's a good point.  Definitely something I will consider.

Alex

Re: [jira] Created: (DIRSERVER-1186) Trace control and request level logging

Posted by Howard Chu <hy...@symas.com>.
Alex Karasulu (JIRA) wrote:
> 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
>              Reporter: Alex Karasulu
>               Fix For: 1.5.4
>
>
> 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.

Perhaps you should write a spec for an "extended diagnostics" control that can 
be attached to a request, causing more information to be returned to the 
client. In general we don't like to expose too much information in protocol 
responses because that can give away too much knowledge to an attacker. But I 
guess if you have access controls restricting who can use a particular 
control, it would be OK.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

[jira] Updated: (DIRSERVER-1186) Trace control and request level logging

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-1186:
-----------------------------------------

    Fix Version/s:     (was: 1.5.5)
                   2.0.0-RC1

Postponed to 2.0.0-RC1

> 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: 2.0.0-RC1
>
>
> 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.


[jira] Updated: (DIRSERVER-1186) Trace control and request level logging

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-1186:
-----------------------------------------

    Affects Version/s: 1.5.4

> 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.


[jira] Commented: (DIRSERVER-1186) Trace control and request level logging

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633055#action_12633055 ] 

Emmanuel Lecharny commented on DIRSERVER-1186:
----------------------------------------------

I will separate the JIRA in three parts :
- a first part for a request scope logging
- a second part for a session scope logging
- a third part for a server scope debugging

> 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.


[jira] Commented: (DIRSERVER-1186) Trace control and request level logging

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633013#action_12633013 ] 

Emmanuel Lecharny commented on DIRSERVER-1186:
----------------------------------------------

So let's consider we add an LogInterceptro to trace every single request from the user.

I don't think that a control is the appropriate way to handle this, as a control is associated with a request, and is not perfectly suited to the feature. I would rather use an extended request. For instance, we can have such a grammar :

logOperations ::= SEQUENCE {
    loggedOperations SEQUENCE {
        operation Operation ;; From the LDAP protocol definition
        logLevel ENUMERATED {
            none (0),
            error (1),
            warning (2),
            info (3),
            debug (4),
            trace (5)
        }
    }
}

Operation ENUMERATION {
    bindRequest    (0),
    bindResponse    (1),
    unbindRequest    (2),
    searchRequest    (3),
    searchResEntry    (4),
    searchResDone    (5),
    searchResRef    (6),
    modifyRequest    (7),
    modifyResponse    (8),
    addRequest    (9),
    addResponse    (10),
    delRequest    (11),
    delResponse     (12),
    modDNRequest    (13),
    modDNResponse    (14),
    compareRequest     (15),
    compareResponse    (16),
    abandonRequest    (17),
    extendedReq     (18),
    extendedResp    (19),
};

With that, you can set up Logs level for each operation, at will.

Then you have to be able to manage the Logger in a specific interceptor.

I think it's a good way to handle this feature.

> 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.


[jira] Updated: (DIRSERVER-1186) Trace control and request level logging

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Karasulu updated DIRSERVER-1186:
-------------------------------------

    Fix Version/s:     (was: 1.5.4)
                   1.5.5

I really like this feature and it should be put into the server as soon as we have a chance.  It can really help out especially to produce the entire log for the user and return it in the control.  It would help to have studio work hand in hand with this.

> 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
>            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.


[jira] Commented: (DIRSERVER-1186) Trace control and request level logging

Posted by "Kiran Ayyagari (JIRA)" <ji...@apache.org>.
    [ 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.