1. Knox Gateway Logs

Apache Log4j is used by the Knox Gateway, for detailed information on extending or setting log values see Logging Practices. The following table provides a description of the log properties available for troubleshooting on the Knox Gateway:

 

Table 12.1. Knox Loggers

LoggerDescription
log4j.logger.org.apache.hadoop.gatewaySets the log level for the Apache Knox Gateway logger.
log4j.logger.org.eclipse.jettySets the log level for the Apache Knox Gateway logger.
log4j.logger.org.apache.shiroSets the log level for the Apache Shiro authentication provider. Use this logger when troubleshooting LDAP authentication issues.
log4j.logger.org.apache.httpSets the log level for HTTP connections.
log4j.logger.org.apache.http.clientIncrease to capture data from HTTP requests.
log4j.logger.org.apache.http.headersIncrease to capture header information.
log4j.logger.org.apache.http.wireIncrease to capture data from server HTTP responses. Produces a large amount of data, should only be used for debugging.


  • Use the following settings to enable header and context logging:

    log4j.logger.org.apache.http=DEBUG
    log4j.logger.org.apache.http.wire=ERROR
    [Note]Note

    These settings produce large amount of data in the logs and should only be used while actively debugging.

  • Use the following settings to enable full wire and context logging:

    log4j.logger.org.apache.http=DEBUG
  • Use the following settings to enable LDAP provider logging:

    log4j.logger.org.apache.shiro=DEBUG
    log4j.logger.org.apache.http.headers=DEBUG
  • Use the following settings to enable context logging for connection management/request execution"

    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 Log4J manual is the best reference for how to configure Log4J. It is available at here.


loading table of contents...