- 
                Notifications
    You must be signed in to change notification settings 
- Fork 528
Closed
Labels
Description
Description
I would like to be able to include a log4j.properties file or something similar with the following contents:
# set logging defaults
log4j.rootLogger=WARN, stdout, R
# Application packages to change the log levels for...
log4j.logger.com.ibm.watson.developer_cloud.service=DEBUG
# Setup a logger
# Appender "R" is a rolling file appender
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=path_to_my_log_file/my_log_file.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=8
log4j.appender.R.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] [%c{1.}] %m%n
Then, it would be great if it could log DEBUG the following (in order of importance):
- Request Headers
- Request URL
- Response Headers
- Response Body
- Request Body
Suggested Solution
Add LOG.log(Level.DEBUG, "your message here") at the suggested points in execution so that developers may turn on DEBUG for the package when they wish to see what is being sent and what is being returned.
Feature Request Checklist:
- A descriptive title starting with the service name
- A description of the problem you're trying to solve
- A suggested solution if possible