You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2006/02/21 07:58:28 UTC

[jira] Resolved: (DIRSERVER-583) org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()

     [ http://issues.apache.org/jira/browse/DIRSERVER-583?page=all ]
     
Emmanuel Lecharny resolved DIRSERVER-583:
-----------------------------------------

    Resolution: Won't Fix

Sorry guys, it's a valid concern, but it's already implemented :)

just set the following logger in log4j.properties file :
org.apache.directory.shared.ldap.codec.TwixDecoder=DEBUG

and you will get :

[07:55:42] DEBUG [org.apache.directory.shared.ldap.codec.TwixDecoder] - Decoding the PDU : 
[07:55:42] DEBUG [org.apache.directory.shared.ldap.codec.TwixDecoder] - 0x30 0x3A 0x02 0x01 0x03 0x63 0x35 0x04 0x15 0x6F 0x75 0x3D 0x53 0x65 0x61 0x72 0x63 0x68 0x2C 0x20 0x6F 0x3D 0x49 0x4D 0x43 0x2C 0x63 0x3D 0x55 0x53 0x0A 0x01 0x00 0x0A 0x01 0x03 0x02 0x01 0x00 0x02 0x01 0x00 0x01 0x01 0x00 0x87 0x0B 0x6F 0x62 0x6A 0x65 0x63 0x74 0x43 0x6C 0x61 0x73 0x73 0x30 0x00 0x00 0x00 0x00 0x00 
[07:55:42] DEBUG [org.apache.directory.shared.ldap.codec.TwixDecoder] - Decoded LdapMessage : LdapMessage
    message Id : 3
    Search Request
        Base Object : 'ou=Search,o=IMC,c=US'
        Scope : base object
        Deref Aliases : deref Always
        Size Limit : no limit
        Time Limit : no limit
        Types Only : false
        Filter : '(objectClass=*)'



> org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()
> ------------------------------------------------------------------------------
>
>          Key: DIRSERVER-583
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-583
>      Project: Directory ApacheDS
>         Type: Improvement
>   Components: ldap
>     Versions: 1.0-RC1
>  Environment: N/A
>     Reporter: Norbert Reilly
>  Attachments: searchreq_tostring.patch, searchreq_tostring2.patch
>
> The other message classes implement friendly toString()s, but the search request doesn't meaning the default INFO level is of very little use for debugging. I set the priority as major because this severely impacts debugging system behaviour, and certainly will be noticed by new users installing RC1 (and may prevent them for providing the raw material to help in raising JIRA issues).
> Some example output (notice the RECEIVED message is a generic java.lang.Object.toString()):
> [21/02/2006 11:06:42] [/155.35.171.101:2351] SENT:     BindResponse
>         Ldap Result
>             Result code : (ResultCodeEnum[SUCCESS=0]) success
>             Matched DN : 'null'
>             Error message : 'null'
> [21/02/2006 11:06:42] [/155.35.171.101:2351] RECEIVED: org.apache.ldap.common.message.SearchRequestImpl@132ae7
> [21/02/2006 11:06:42] [/155.35.171.101:2351] WRITE:     Search Result Entry
>         Object Name : 'cn=ETA1,dc=example,dc=com'
>         Attributes
> Attributes

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Resolved: (DIRSERVER-583) org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()

Posted by Alex Karasulu <ao...@bellsouth.net>.
Norbet Reilly wrote:

>I understand where you are coming from and I have seen the debugging
>output you mention (but didn't know how to quickly track down the
>particular logger).
>
>We have a proxy GUI which needs to display this information in a
>window (and operates at the higher level of the provider), so having a
>toString() is a much better solution for us. Also this particular case
>it at odds with all the other *Impl.toString() methods (see also
>http://issues.apache.org/jira/browse/DIRSERVER-585 which has a simple
>bug).
>
>At any rate, I'm sure this isn't the most important stuff you guys are
>doing for RC1 and I have my own patches to use.
>  
>
Incidentally Norbet you sound just fine.  I think we could use the 
string method why not?  toString() is not the same as the decoder 
dumping it's output and might be used for other things?  Emmanuel you 
still think it's unnecessary?  The guy has a patch ;).

Alex


Re: [jira] Resolved: (DIRSERVER-583) org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()

Posted by Norbet Reilly <nr...@gmail.com>.
And thanks for all your hard work (that last posting unintentionally
sounded a little grumpy)!

Re: [jira] Resolved: (DIRSERVER-583) org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()

Posted by Emmanuel Lecharny <el...@gmail.com>.
Norbet Reilly a écrit :

>I understand where you are coming from and I have seen the debugging
>output you mention (but didn't know how to quickly track down the
>particular logger).
>  
>
Yeah. It's easier when you actually have wrote the code :)

>We have a proxy GUI which needs to display this information in a
>window (and operates at the higher level of the provider), so having a
>toString() is a much better solution for us. Also this particular case
>it at odds with all the other *Impl.toString() methods (see also
>http://issues.apache.org/jira/browse/DIRSERVER-585 which has a simple
>bug).
>  
>
Sure. That's also a valid concern. The point is that we have had two 
different codecs and we decided to discord one of them. So we had to use 
TwixTransformer to switch from one format to another. Too bad : twix has 
toString() method for every kind of LdapMessage, but this is not the 
case for the other encoder.

Merging both codec and both data structure (with toString() methods) is 
already in our roadmap : https://issues.apache.org/jira/browse/DIRSERVER-176

>At any rate, I'm sure this isn't the most important stuff you guys are
>doing for RC1 and I have my own patches to use.
>  
>
What you can do is to "import" the toString() method in 
org.apache.directory.shared.ldap.codec.search.SearchRequest to have a 
working trace. Be carefull that you may have to modify it a bit to work 
in SearchMessageImpl.

I think we will improve debugging messages in RC2 or RC3. The pb is RC1. 
It's a tought and bumpy road we are cruising actually;

Re: [jira] Resolved: (DIRSERVER-583) org.apache.ldap.common.message.SearchRequestImpl needs to implement toString()

Posted by Norbet Reilly <nr...@gmail.com>.
I understand where you are coming from and I have seen the debugging
output you mention (but didn't know how to quickly track down the
particular logger).

We have a proxy GUI which needs to display this information in a
window (and operates at the higher level of the provider), so having a
toString() is a much better solution for us. Also this particular case
it at odds with all the other *Impl.toString() methods (see also
http://issues.apache.org/jira/browse/DIRSERVER-585 which has a simple
bug).

At any rate, I'm sure this isn't the most important stuff you guys are
doing for RC1 and I have my own patches to use.