Amazon AWS SDK Guida Utente Pagina 18

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 73
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 17
Logging AWS SDK for Java Calls
The AWS SDK for Java is instrumented with Apache Commons Logging, which is an abstraction layer
that enables the use of any one of a number of logging systems at runtime. Supported logging systems
include the Java Logging Framework and Apache Log4j, among others. This topic explains how to use
Log4j.You can learn more about Log4j on the Log4j page at the Apache website.You can use the SDK's
logging functionality without making any changes to your application code.
In order to use Log4j with the SDK, you need to download the Log4j jar from the Apache website.The
jar is not included in the SDK. Copy the jar file to a location that is on your classpath.
Log4j uses a configuration file, log4j.properties. Example configuration files are shown below. Copy this
configuration file to a directory on your classpath. The Log4j jar and the log4j.properties file do not have
to be in the same directory.
The log4j.properties configuration file specifies properties such as logging level, where logging output is
sent (such as to a file or to the console), and the format of the output.The logging level is the granularity
of output that the logger generates. Log4j supports the concept of multiple logging hierarchies.The logging
level is set independently for each hierarchy. The following two logging hierarchies are available in the
SDK.
log4j.logger.com.amazonaws
log4j.logger.org.apache.http.wire
Setting the Classpath
Both the Log4j jar and the log4j.properties file must be located on your classpath. If you are using Apache
Ant, set the classpath in the path element in your Ant file. Here is an example path element from the Ant
file for the Amazon S3 example included with the SDK:
<path id="aws.java.sdk.classpath">
<fileset dir="../../third-party" includes="**/*.jar"/>
<fileset dir="../../lib" includes="**/*.jar"/>
<pathelement location="."/>
</path>
If you are using the Eclipse IDE, you can set the classpath by navigating to:
Project | Properties | Java Build Path
Service-Specific Errors and Warnings
We recommend that you always leave the "com.amazonaws" logger hierarchy set to "WARN" in order to
catch any important messages from the client libraries. For example, if the Amazon S3 client detects that
your application hasn't properly closed an InputStream and could be leaking resources, it will report it
through a warning message to the logs. This will also ensure that messages are logged if the client has
any problems handling requests or responses.
The following log4j.properties file sets the rootLogger to WARN, which will cause warning and error
messages from all loggers in the "com.amazonaws" hierarchy to be included. Alternatively, you can
explicitly set the com.amazonaws logger to WARN.
Version v1.0.0
15
AWS SDK for Java Developer Guide
Logging
Vedere la pagina 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 72 73

Commenti su questo manuale

Nessun commento

Samsung SP-420 manuales

Manuales del propietario y guías del usuario para Reproductores de dvd Samsung SP-420.
Ofrecemos manuales en pdf Samsung SP-420 para descargar gratis por tipos de documentos:






Más productos y manuales para Reproductores de dvd Samsung

Modelos Tipo de documento
AH68-01959S Manual de usuario   Samsung HT-TXQ120 User manual, 36 paginas
DVD-C631P Manual de usuario   Samsung DVD-C631P User manual, 24 paginas
DVD-FP580 Manual de usuario   Samsung DVD-FP580 User's Manual, 63 paginas
DVD-HD931 Manual de usuario   Samsung DVD-HD931 User manual, 26 paginas
SP43T9 Manual de usuario   Samsung SP-54T8HE User manual, 64 paginas
DVD-HD870 Manual de usuario   Samsung DVD-HD870 User manual, 64 paginas
DVD-HD950 Manual de usuario    Samsung DVD-HD950 User manual, 75 paginas
DVD-HR725 Manual de usuario   Samsung DVD-HR725 User manual, 135 paginas
AK68-00102A Manual de usuario   Samsung AK68-00102A User's Manual, 21 paginas
DVD-HD845 Manual de usuario   Samsung DVD-HD845 User's Manual, 62 paginas
HT-TQ22 Manual de usuario   Samsung HT-TQ22 User manual, 80 paginas
DVD-V6500 Manual de usuario   Samsung DVD-V6500K User manual, 54 paginas
AH68-01008B Manual de usuario   Samsung HT-DL200 User manual, 23 paginas
SN-324 Manual de usuario   Samsung SN-324 User's Manual, 5 paginas
HT-TX75 Manual de usuario   Samsung HT-TX75 User manual, 39 paginas
DVD-V8080 Manual de usuario   Samsung DVD-V8080 User's Manual, 34 paginas
DVD-L300WDEU Manual de usuario   Samsung DVD-L300WDEU User's Manual, 34 paginas
DVD-R160 Manual de usuario   Samsung DVD-R160 User's Manual, 83 paginas
AH68-02293B Manual de usuario   Samsung HT-C350 User manual, 39 paginas
DVD-R155 Manual de usuario   Samsung DVD-R155 User's Manual, 75 paginas