Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 66986 invoked from network); 7 Jan 2006 10:34:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jan 2006 10:34:10 -0000 Received: (qmail 50395 invoked by uid 500); 7 Jan 2006 10:34:10 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 50384 invoked by uid 500); 7 Jan 2006 10:34:09 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 50373 invoked by uid 99); 7 Jan 2006 10:34:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 02:34:09 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.186.19.66] (HELO mail22.bluewin.ch) (195.186.19.66) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 02:34:08 -0800 Received: from [192.168.0.3] (83.77.226.14) by mail22.bluewin.ch (Bluewin 7.2.070) id 43BCE7800008BF5D for httpclient-dev@jakarta.apache.org; Sat, 7 Jan 2006 10:33:47 +0000 Subject: RE: Post Method - Content Length Header From: Oleg Kalnichevski To: HttpClient Project In-Reply-To: <8A4F55A988C94B40B668BADA133C5CE409A97D4A@mn-msp-exchange.OldRepublicTitle.com> References: <8A4F55A988C94B40B668BADA133C5CE409A97D4A@mn-msp-exchange.OldRepublicTitle.com> Content-Type: text/plain Date: Sat, 07 Jan 2006 11:32:38 +0100 Message-Id: <1136629958.6389.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Fri, 2006-01-06 at 16:08 -0600, Gerdes, Tom wrote: > Is there an example source code that shows exactly how to set up the > wire log. I looked at the web site and it shows system properties to > set. I did set them in my application. Although, I do not seem to be > getting the level of detail that I would like. > > Here is a snippet of my code... is this setup right? > > import org.apache.commons.httpclient.*; > import org.apache.commons.httpclient.HttpClient; > import org.apache.commons.httpclient.HttpState; > import org.apache.commons.httpclient.HttpStatus; > import org.apache.commons.httpclient.HttpMethodBase; > import org.apache.commons.httpclient.cookie.CookiePolicy; > import org.apache.commons.httpclient.cookie.CookieSpec; > import org.apache.commons.httpclient.cookie.MalformedCookieException; > import org.apache.commons.httpclient.methods.GetMethod; > import org.apache.commons.httpclient.methods.multipart.*; > import org.apache.commons.httpclient.methods.PostMethod; > import org.apache.commons.httpclient.methods.RequestEntity; > import org.apache.commons.httpclient.methods.StringRequestEntity; > import org.apache.commons.httpclient.Cookie.*; > import org.apache.commons.httpclient.params.*; > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > import java.io.*; > import java.util.*; > import java.lang.String.*; > import java.lang.Integer.*; > import java.lang.Long.*; > > public class BANKMIJ > { > > static String host = "127.0.0.1"; > static int port = 443; > static String className = "BANKMIJ"; > static Log logger = LogFactory.getLog(className); > -----------------------^ This statement executed before the 'main' method Tom, make sure you properly configure commons-logging PRIOR to instantiating the Log instance. I personally always set these system properties on the command line primarily to avoid situations like this one java -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug Hope this helps Oleg > public static void main(String[] argv) throws Exception > { > > System.setProperty("org.apache.commons.logging.Log", > "org.apache.commons.logging.impl.SimpleLog"); > > System.setProperty("org.apache.commons.logging.simplelog.showdatetime", > "true"); > > System.setProperty("org.apache.commons.logging.simplelog.log.httpclient. > wire", "debug"); > > System.setProperty("org.apache.commons.logging.simplelog.log.org.apache. > commons.httpclient", "debug"); > > > > > -----Original Message----- > From: Oleg Kalnichevski [mailto:olegk@apache.org] > Sent: Thursday, January 05, 2006 3:21 PM > To: HttpClient Project > Subject: Re: Post Method - Content Length Header > > Gerdes, Tom wrote: > > (1) I am running a standalone application not using Websphere. Output > > is not directed to a file. > > > > Then simple log should work. We will not be able to help you unless you > manage to produce a wire log of the HTTP session. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org