2
Apr

Maverick SSHD uses commons logging, you can enable it using a tool such as log4j.

If you are using version 1.4.x ensure you are using maverick-sshd-debug.jar instead of maverick-sshd.jar. For 1.5.x versions you can continue to use maverick-sshd.jar.

Again, if you are using version 1.4.x place the following statement in your code before you use the API to ensure events are logged to commons logging. This is not required for 1.5.x versions.

DaemonContext.addEventListener(new SSHDLoggingListener());

To configure log4j we use

org.apache.log4j.PropertyConfigurator.configure("log4j.properties");

with log4j.properties file containing

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG,CONSOLE,LOGFILE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %x - %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=maverick.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %x - %m%n
Category : Maverick SSHD

Sorry, the comment form is closed at this time.