RE: Mysterious message in client
Hi Philip, Restlet logger names should all start with "org.restlet" as explain on this page: http://wiki.restlet.org/docs_1.1/13-restlet/48-restlet/101-restlet.html To debug this more precisely, you can invoke this static method at the beginning of your program: com.noelios.restlet.util.TraceHandler.register() Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Philip Johnson [mailto:john...@hawaii.edu] Envoyé : vendredi 10 juillet 2009 23:18 À : discuss@restlet.tigris.org Objet : RE: Mysterious message in client I have encountered a similar output message after upgrading to 1.3.6: INFO: Starting the HTTP client Jul 10, 2009 10:48:56 AM com.noelios.restlet.ext.net.HttpClientHelper start In my case, it appears that the name of this logger is "global". If that is true, I believe this is a bug, as the name of the logger should really start with "com.noelios". Is this reasoning correct? Thanks, Philip Johnson -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23703 49 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2372687
RE: Mysterious message in client
I have encountered a similar output message after upgrading to 1.3.6: INFO: Starting the HTTP client Jul 10, 2009 10:48:56 AM com.noelios.restlet.ext.net.HttpClientHelper start In my case, it appears that the name of this logger is "global". If that is true, I believe this is a bug, as the name of the logger should really start with "com.noelios". Is this reasoning correct? Thanks, Philip Johnson -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2370349
RE: Re: Mysterious message in client
Hi there, On the server-side, you need to use representations that can compute their size in advance such as StringRepresentation and AppendableRepresentation. Again, those messages are just informational and should be filtered out using a proper "logging.properties" configuration file. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : webp...@tigris.org [mailto:webp...@tigris.org] Envoyé : jeudi 25 juin 2009 21:16 À : discuss@restlet.tigris.org; Rhett Sutphin Objet : RE: Re: Mysterious message in client Hi, I do not want to change the setting in the log file. How can I make sure to pass Content-Length header in the response so that it'll not display the INFO messages? My current client code is as shown below: [code] Client client = new Client(Protocol.HTTP); Reference uri = new Reference("http://mywebsite.com/accounts/12";); Response response = client.get(uri); if (response.isEntityAvailable()) { if (null != response.getStatus()) { if (response.getStatus().isSuccess()) { System.out.println("Success"); } else { System.out.println("Fail"); } } } [/code] I'll appreciate if you can provide some sample code. Thanks! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23654 43 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2368095
RE: Re: Mysterious message in client
Hi, I do not want to change the setting in the log file. How can I make sure to pass Content-Length header in the response so that it'll not display the INFO messages? My current client code is as shown below: [code] Client client = new Client(Protocol.HTTP); Reference uri = new Reference("http://mywebsite.com/accounts/12";); Response response = client.get(uri); if (response.isEntityAvailable()) { if (null != response.getStatus()) { if (response.getStatus().isSuccess()) { System.out.println("Success"); } else { System.out.println("Fail"); } } } [/code] I'll appreciate if you can provide some sample code. Thanks! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2365443
Re: Mysterious message in client
Hello Rick, you can ignore this message. It just says that no content-length has been provided. If you want to remote this message, you can set the log level to warning see [1]. best regards, Thierry Boileau [1] http://wiki.restlet.org/docs_1.2/101-restlet.html > Hi, > I've written the client for my web serv ice program. This client is also > in Java. > > Whenever I invoke the client through my shell script, it gives me the > following message: > > [code] > [mybox:/var/]$ ./validate.sh > Jun 24, 2009 9:49:55 PM com.noelios.restlet.http.StreamClientHelper start > INFO: Starting the HTTP client > Jun 24, 2009 9:49:55 PM com.noelios.restlet.http.HttpClientCall > getResponseEntity > INFO: The length of the message body is unknown. The entity must be handled > carefully and consumed entirely in order to surely release the connection. > [mybox:/var/]$ > [/code] > > Can I ignore this message or is it some problem with the code? How can I skip > the message without ignoring through log4j properties? > > Thanks! > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2365116 > > -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2365380
Re: Mysterious message in client
Hi Rick, On Jun 24, 2009, at 4:59 PM, Rick wrote: > Hi, >I've written the client for my web serv ice program. This client > is also in Java. > >Whenever I invoke the client through my shell script, it gives me > the following message: > > [code] > [mybox:/var/]$ ./validate.sh > Jun 24, 2009 9:49:55 PM com.noelios.restlet.http.StreamClientHelper > start > INFO: Starting the HTTP client > Jun 24, 2009 9:49:55 PM com.noelios.restlet.http.HttpClientCall > getResponseEntity > INFO: The length of the message body is unknown. The entity must be > handled carefully and consumed entirely in order to surely release > the connection. > [mybox:/var/]$ > [/code] > > Can I ignore this message or is it some problem with the code? How > can I skip the message without ignoring through log4j properties? If you control the service, I believe you can avoid this by making sure that it includes an accurate Content-Length header in the response. Rhett -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2365373