Example usage for java.util.logging Logger Logger

List of usage examples for java.util.logging Logger Logger

Introduction

In this page you can find the example usage for java.util.logging Logger Logger.

Prototype

Logger

Source Link

Usage

From source file:hudson.scm.BlameSubversionSCM.java

/**
 * Enables trace logging of Ganymed SSH library.
 * <p>//from   w  w  w . j av a  2s.  c  o m
 * Intended to be invoked from Groovy console.
 */
public static void enableSshDebug(Level level) {
    if (level == null)
        level = Level.FINEST; // default

    final Level lv = level;

    com.trilead.ssh2.log.Logger.enabled = true;
    com.trilead.ssh2.log.Logger.logger = new DebugLogger() {
        private final Logger LOGGER = Logger.getLogger(SCPClient.class.getPackage().getName());

        public void log(int level, String className, String message) {
            LOGGER.log(lv, className + ' ' + message);
        }
    };
}