Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B72F21890C for ; Wed, 27 Jan 2016 18:14:54 +0000 (UTC) Received: (qmail 89691 invoked by uid 500); 27 Jan 2016 18:14:54 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 89651 invoked by uid 500); 27 Jan 2016 18:14:54 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 89642 invoked by uid 99); 27 Jan 2016 18:14:54 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2016 18:14:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0D19E1A066E for ; Wed, 27 Jan 2016 18:14:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.247 X-Spam-Level: * X-Spam-Status: No, score=1.247 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ZKLaZU2Vl7AT for ; Wed, 27 Jan 2016 18:14:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 63EE4429E2 for ; Wed, 27 Jan 2016 18:14:42 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DCB19E0185 for ; Wed, 27 Jan 2016 18:14:41 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id CAD443A1751 for ; Wed, 27 Jan 2016 18:14:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1727146 - in /httpcomponents/project-website/trunk/src/site: ./ apt/httpcomponents-client-4.5.x/ apt/httpcomponents-client-5.0.x/ Date: Wed, 27 Jan 2016 18:14:41 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160127181441.CAD443A1751@svn01-us-west.apache.org> Author: olegk Date: Wed Jan 27 18:14:41 2016 New Revision: 1727146 URL: http://svn.apache.org/viewvc?rev=1727146&view=rev Log: Updated project website for HttpClient 5.0-alpha1 release Added: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/download.apt httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/examples.apt httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/index.apt httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/logging.apt Modified: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-4.5.x/download.apt httpcomponents/project-website/trunk/src/site/site.xml Modified: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-4.5.x/download.apt URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-4.5.x/download.apt?rev=1727146&r1=1727145&r2=1727146&view=diff ============================================================================== --- httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-4.5.x/download.apt (original) +++ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-4.5.x/download.apt Wed Jan 27 18:14:41 2016 @@ -33,7 +33,7 @@ HttpClient Downloads The latest release available for download: {{{http://hc.apache.org/downloads.cgi}Release packages}} - - {{{http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.3.x.txt}Release Notes}} - + {{{http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.5.x.txt}Release Notes}} - {{{http://www.apache.org/licenses/LICENSE-2.0.html}License}} {Dependency management} Added: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/download.apt URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/download.apt?rev=1727146&view=auto ============================================================================== --- httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/download.apt (added) +++ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/download.apt Wed Jan 27 18:14:41 2016 @@ -0,0 +1,56 @@ +~~ ==================================================================== +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. +~~ ==================================================================== +~~ +~~ This software consists of voluntary contributions made by many +~~ individuals on behalf of the Apache Software Foundation. For more +~~ information on the Apache Software Foundation, please see +~~ . + + ---------- + HttpComponents HttpClient Download Page + ---------- + ---------- + ---------- + +HttpClient Downloads + + The latest release available for download: + + {{{http://hc.apache.org/downloads.cgi}Release packages}} - + {{{http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-5.0.x.txt}Release Notes}} - + {{{http://www.apache.org/licenses/LICENSE-2.0.html}License}} + +{Dependency management} + + If you are using a dependency manager for your project such as + {{{http://maven.apache.org}Apache Maven}} or + {{{http://ant.apache.org/projects/ivy.html}Apache Ivy}}, + you can create a dependency on HttpClient modules by using this information: + + {{{./httpclient/dependency-info.html}HttpClient}} + + {{{./httpclient-fluent/dependency-info.html}Fluent HC}} + + {{{./httpclient-cache/dependency-info.html}HttpClient Cache}} + + {{{./httpclient-win/dependency-info.html}HttpClient Windows extensions}} + + {{{./httpclient-osgi/dependency-info.html}HttpClient OSGi}} + + Added: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/examples.apt URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/examples.apt?rev=1727146&view=auto ============================================================================== --- httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/examples.apt (added) +++ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/examples.apt Wed Jan 27 18:14:41 2016 @@ -0,0 +1,111 @@ +~~ ==================================================================== +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. +~~ ==================================================================== +~~ +~~ This software consists of voluntary contributions made by many +~~ individuals on behalf of the Apache Software Foundation. For more +~~ information on the Apache Software Foundation, please see +~~ . + + ---------- + HttpComponents HttpClient Examples + ---------- + ---------- + ---------- + +HttpClient Examples + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientWithResponseHandler.java}Response handling}} + + This example demonstrates how to process HTTP responses using a response handler. This is + the recommended way of executing HTTP requests and processing HTTP responses. This approach + enables the caller to concentrate on the process of digesting HTTP responses and to delegate + the task of system resource deallocation to HttpClient. The use of an HTTP response handler + guarantees that the underlying HTTP connection will be released back to the connection manager + automatically in all cases. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientConnectionRelease.java}Manual connection release}} + + This example demonstrates how to ensure the release of the underlying HTTP connection back to + the connection manager in case of a manual processing of HTTP responses. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java}HttpClient configuration}} + + This example demonstrates how to customize and configure the most common aspects of HTTP request execution + and connection management. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientAbortMethod.java}Abort method}} + + This example demonstrates how to abort an HTTP request before its normal completion. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientAuthentication.java}Client authentication}} + + This example uses HttpClient to execute an HTTP request against a target site that requires user + authentication. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientExecuteProxy.java}Request via a proxy}} + + This example demonstrates how to send an HTTP request via a proxy. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientProxyAuthentication.java}Proxy authentication}} + + A simple example showing execution of an HTTP request over a secure connection tunneled through + an authenticating proxy. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientChunkEncodedPost.java}Chunk encoded POST}} + + This example shows how to stream out a request entity using chunk encoding. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientCustomContext.java}Custom execution context}} + + This example demonstrates the use of a local HTTP context populated custom attributes. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientFormLogin.java}Form based logon}} + + This example demonstrates how HttpClient can be used to perform form-based logon. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientMultiThreadedExecution.java}Threaded request execution}} + + An example that executes HTTP requests from multiple worker threads. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientCustomSSL.java}Custom SSL context}} + + This example demonstrates how to create secure connections with a custom SSL context. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientPreemptiveBasicAuthentication.java}Preemptive BASIC authentication}} + + This example shows how HttpClient can be customized to authenticate preemptively using BASIC + scheme. Generally, preemptive authentication can be considered less secure than a response to + an authentication challenge and therefore discouraged. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientPreemptiveDigestAuthentication.java}Preemptive DIGEST authentication}} + + This example shows how HttpClient can be customized to authenticate preemptively using DIGEST + scheme. Generally, preemptive authentication can be considered less secure than a response to + an authentication challenge and therefore discouraged. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ProxyTunnelDemo.java}Proxy tunnel}} + + This example shows how to use ProxyClient in order to establish a tunnel through an HTTP proxy + for an arbitrary protocol. + + * {{{./httpclient/examples/org/apache/hc/client5/http/examples/ClientMultipartFormPost.java}Multipart encoded request entity}} + + This example shows how to execute requests enclosing a multipart encoded entity. + + Added: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/index.apt URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/index.apt?rev=1727146&view=auto ============================================================================== --- httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/index.apt (added) +++ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/index.apt Wed Jan 27 18:14:41 2016 @@ -0,0 +1,130 @@ +~~ ==================================================================== +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. +~~ ==================================================================== +~~ +~~ This software consists of voluntary contributions made by many +~~ individuals on behalf of the Apache Software Foundation. For more +~~ information on the Apache Software Foundation, please see +~~ . + + ---------- + HttpComponents HttpClient Overview + ---------- + ---------- + ---------- + +HttpClient Overview + + The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the + Internet today. Web services, network-enabled appliances and the growth of network computing + continue to expand the role of the HTTP protocol beyond user-driven web browsers, while + increasing the number of applications that require HTTP support. + + Although the java.net package provides basic functionality for accessing resources via HTTP, it + doesn't provide the full flexibility or functionality needed by many applications. HttpClient + seeks to fill this void by providing an efficient, up-to-date, and feature-rich package + implementing the client side of the most recent HTTP standards and recommendations. + + Designed for extension while providing robust support for the base HTTP protocol, HttpClient + may be of interest to anyone building HTTP-aware client applications such as web browsers, web + service clients, or systems that leverage or extend the HTTP protocol for distributed + communication. + +{Documentation} + + [[1]] {{{./examples.html}HttpClient Examples}} - a set of examples demonstrating some of + the more complex behavior. + + [[1]] Project reports + + * {{{./httpclient/project-reports.html}HttpClient}} + + * {{{./httpclient-fluent/project-reports.html}HC Fluent}} + + * {{{./httpclient-cache/project-reports.html}HttpClient Cache}} + + * {{{./httpclient-win/project-reports.html}HttpClient Windows extensions}} + + * {{{./httpclient-osgi/project-reports.html}HttpClient OSGi}} + +{Features} + + * Standards based, pure Java, implementation of HTTP versions 1.0 and 1.1 + + * Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) + in an extensible OO framework. + + * Supports encryption with HTTPS (HTTP over SSL) protocol. + + * Transparent connections through HTTP proxies. + + * Tunneled HTTPS connections through HTTP proxies, via the CONNECT method. + + * Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, SNPNEGO, Kerberos authentication schemes. + + * Plug-in mechanism for custom authentication schemes. + + * Pluggable secure socket factories, making it easier to use third party solutions + + * Connection management support for use in multi-threaded applications. Supports setting the + maximum total connections as well as the maximum connections per host. Detects and closes + stale connections. + + * Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them + back out in a Cookie: header when appropriate. + + * Plug-in mechanism for custom cookie policies. + + * Request output streams to avoid buffering any content body by streaming directly to the socket + to the server. + + * Response input streams to efficiently read the response body by streaming directly from the + socket to the server. + + * Persistent connections using KeepAlive in HTTP/1.0 and persistance in HTTP/1.1 + + * Direct access to the response code and headers sent by the server. + + * The ability to set connection timeouts. + + * Support for HTTP/1.1 response caching. + + * Source code is freely available under the Apache License. + +{Standards Compliance} + + HttpClient strives to conform to the following specifications endorsed by the Internet + Engineering Task Force (IETF) and the internet at large: + + * {{{http://tools.ietf.org/html/rfc7230}RFC 7230}} - Hypertext Transfer Protocol (HTTP/1.1): + Message Syntax and Routing + + * {{{http://tools.ietf.org/html/rfc7231}RFC 7231}} - Hypertext Transfer Protocol (HTTP/1.1): + Semantics and Content + + * {{{http://tools.ietf.org/html/rfc7235}RFC 7235}} - Hypertext Transfer Protocol (HTTP/1.1): + Authentication + + * {{{http://tools.ietf.org/html/rfc1945}RFC 1945}} - Hypertext Transfer Protocol -- HTTP/1.0 + + * {{{http://tools.ietf.org/html/rfc2817}RFC 2817}} - Upgrading to TLS Within HTTP/1.1 + + * {{{http://tools.ietf.org/html/rfc2818}RFC 2818}} - HTTP Over TLS + + * {{{http://tools.ietf.org/html/rfc6265}RFC 6265}} HTTP State Management Mechanism (Cookies) + Added: httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/logging.apt URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/logging.apt?rev=1727146&view=auto ============================================================================== --- httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/logging.apt (added) +++ httpcomponents/project-website/trunk/src/site/apt/httpcomponents-client-5.0.x/logging.apt Wed Jan 27 18:14:41 2016 @@ -0,0 +1,284 @@ +~~ ==================================================================== +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. +~~ ==================================================================== +~~ +~~ This software consists of voluntary contributions made by many +~~ individuals on behalf of the Apache Software Foundation. For more +~~ information on the Apache Software Foundation, please see +~~ . + + ---------- + HttpClient Logging Practices + ---------- + ---------- + ---------- + +Logging Practices + + Being a library HttpClient is not to dictate which logging framework the user has to use. + Therefore HttpClient utilizes the logging interface provided by the + {{{http://commons.apache.org/proper/commons-logging/}Commons Logging}} package. + <<>> provides a simple and generalized + {{{http://commons.apache.org/proper/commons-logging/javadocs/api-release/}log interface}} to + various logging packages. By using <<>>, HttpClient can be configured for a + variety of different logging behaviours. That means the user will have to make a choice which + logging framework to use. By default <<>> supports the following logging + frameworks: + + * {{{http://logging.apache.org/log4j/docs/index.html}Log4J}} + + * {{{http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html} + java.util.logging}} + + * {{{http://commons.apache.org/proper/commons-logging/javadocs/api-release/org/apache/commons/logging/impl/SimpleLog.html} + SimpleLog}} (internal to <<>>) + + By implementing some simple interfaces <<>> can be extended to support + basically any other custom logging framework. <<>> tries to automatically + discover the logging framework to use. If it fails to select the expected one, you must + configure <<>> by hand. Please refer to the <<>> + documentation for more information. + + HttpClient performs three different kinds of logging: the standard context logging used within + each class, HTTP header logging and full wire logging. + +* {Context Logging} + + Context logging contains information about the internal operation of HttpClient as it performs + HTTP requests. Each class has its own log named according to the class's fully qualified name. + For example the class <<>> has a log named + <<>>. Since all classes follow this convention + it is possible to configure context logging for all classes using the single log named + <<>>. + +* {Wire Logging} + + The wire log is used to log all data transmitted to and from servers when executing HTTP + requests. The wire log uses the <<>> logging category. This log should + only be enabled to debug problems, as it will produce an extremely large amount of log data. + +* {HTTP header Logging} + + Because the content of HTTP requests is usually less important for debugging than the HTTP + headers, the <<>> logging category for capturing HTTP headers only. + +* {Configuration Examples} + + <<>> can delegate to a variety of loggers for processing the actual output. + Below are configuration examples for <<>>, <<>> and + <<>>. + +** {Commons Logging Examples} + + <<>> comes with a basic logger called <<>>. This logger writes all + logged messages to <<>>. The following examples show how to configure + <<>> via system properties to use <<>>. It is strongly recommended + to configure <<>> system properties through JVM process arguments at the + start up. + + * Enable header wire + context logging - <> + +-------------------------------------- +-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +-Dorg.apache.commons.logging.simplelog.showdatetime=true +-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG +-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR +-------------------------------------- + + * Enable full wire + context logging + +-------------------------------------- +-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +-Dorg.apache.commons.logging.simplelog.showdatetime=true +-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG +-------------------------------------- + + * Enable context logging for connection management + +-------------------------------------- +-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +-Dorg.apache.commons.logging.simplelog.showdatetime=true +-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG +-------------------------------------- + + * Enable context logging for connection management / request execution + +-------------------------------------- +-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +-Dorg.apache.commons.logging.simplelog.showdatetime=true +-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG +-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.client=DEBUG +-Dorg.apache.commons.logging.simplelog.log.org.apache.http.client=DEBUG +-------------------------------------- + +** {Log4j Examples} + + The simplest way to configure <<>> is via a <<>> file. <<>> + will automatically read and configure itself using a file named <<>> when + it's present at the root of the application classpath. Below are some <<>> configuration + examples. + + <> <<>> is not included in the <<>> distribution. + + * Enable header wire + context logging - <> + +-------------------------------------- +log4j.rootLogger=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n + +log4j.logger.org.apache.http=DEBUG +log4j.logger.org.apache.http.wire=ERROR +-------------------------------------- + + * Enable full wire + context logging + +-------------------------------------- +log4j.rootLogger=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n + +log4j.logger.org.apache.http=DEBUG +-------------------------------------- + + * Enable context logging for connection management + +-------------------------------------- +log4j.rootLogger=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n + +log4j.logger.org.apache.http.impl.conn=DEBUG +-------------------------------------- + + * Enable context logging for connection management / request execution + +-------------------------------------- +log4j.rootLogger=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n + +log4j.logger.org.apache.http.impl.conn=DEBUG +log4j.logger.org.apache.http.impl.client=DEBUG +log4j.logger.org.apache.http.client=DEBUG +-------------------------------------- + + [] + + Note that the default configuration for Log4J is very inefficient as it causes all the logging + information to be generated but not actually sent anywhere. The <<>> manual is the + best reference for how to configure <<>>. It is available at + {{{http://logging.apache.org/log4j/docs/manual.html} + http://logging.apache.org/log4j/docs/manual.html}}. + +** {java.util.logging Examples} + + Since JDK 1.4 there has been a package + {{{http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html} + java.util.logging}} that provides a logging framework similar to <<>>. By default it + reads a config file from <<<$JAVA_HOME/jre/lib/logging.properties>>> which looks like this + (comments stripped): + +-------------------------------------- +handlers=java.util.logging.ConsoleHandler +.level=INFO +java.util.logging.FileHandler.pattern = %h/java%u.log +java.util.logging.FileHandler.limit = 50000 +java.util.logging.FileHandler.count = 1 +java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +com.xyz.foo.level = SEVERE +-------------------------------------- + + To customize logging a custom <<>> file should be created in the project + directory. The location of this file must be passed to the JVM as asystem property. This can be + done on the command line like so: + +-------------------------------------- +$JAVA_HOME/java -Djava.util.logging.config.file=$HOME/myapp/logging.properties +-classpath $HOME/myapp/target/classes com.myapp.Main +-------------------------------------- + + Alternatively {{{http://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html#readConfiguration(java.io.InputStream)"} + LogManager#readConfiguration(InputStream)}} can be used to pass it the desired configuration. + + * Enable header wire + context logging - <> + +-------------------------------------- +.level = INFO + +handlers=java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.ConsoleHandler.level = ALL + +org.apache.http.level = FINEST +org.apache.http.wire.level = SEVERE +-------------------------------------- + + * Enable full wire + context logging + +-------------------------------------- +.level = INFO + +handlers=java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.ConsoleHandler.level = ALL + +org.apache.http.level = FINEST +-------------------------------------- + + * Enable context logging for connection management + +-------------------------------------- +.level = INFO + +handlers=java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.ConsoleHandler.level = ALL + +org.apache.http.impl.conn.level = FINEST +-------------------------------------- + + * Enable context logging for connection management / request execution + +-------------------------------------- +.level = INFO + +handlers=java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.ConsoleHandler.level = ALL + +org.apache.http.impl.conn.level = FINEST +org.apache.http.impl.client.level = FINEST +org.apache.http.client.level = FINEST +-------------------------------------- + + [] + + More detailed information is available from the + {{{http://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html} + Java Logging documentation}}. Modified: httpcomponents/project-website/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/httpcomponents/project-website/trunk/src/site/site.xml?rev=1727146&r1=1727145&r2=1727146&view=diff ============================================================================== --- httpcomponents/project-website/trunk/src/site/site.xml (original) +++ httpcomponents/project-website/trunk/src/site/site.xml Wed Jan 27 18:14:41 2016 @@ -77,6 +77,12 @@ + + + + + +