Logging

By default, wlshell logs information onto file "wlshell.log", located in the working directory.

To enable debug logging, the shell can be started with the -d parameter.

wlsh.cmd -d

wlshell uses log4j for logging. The way wlshell logs information can be customized by providing a log4j configuration properties file with the -d parameter.

wlsh.cmd -d <customlog.properties>

Here are some logging configuration examples.

#This configuration file represents the default logging configuration
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n
log4j.appender.A1.File=wlshell.log
#This configuration file represents the debug logging configuration
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %l - %m%n
log4j.appender.A1.File=wlshell.log
#This configuration file specifies a NullAppender to effectively suppress
#any logging. No message will be written to file wlshell.log
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.varia.NullAppender
log4j.appender.A1.layout.ConversionPattern=%d %-5p - %m%n