package com.athaydes.jgrab.log;

/**
 * Internal logger.
 */
public class Logger {

    private static final String XXX = "--------------";

    public static void log( String message ) {
        System.err.println( message );
    }

    public static void logPhase( String phase ) {
        System.err.println( XXX + " " + phase + " " + XXX );
    }

}

package com.athaydes.jgrab.log;

/**
 * Internal logger.
 */
public class Logger {

    private static final String XXX = "--------------";

    private static boolean enabled = System.getProperty( "jgrab.debug" ) != null;

    public static void log( String message ) {
        if ( enabled ) System.err.println( message );
    }

    public static void logPhase( String phase ) {
        if ( enabled ) System.err.println( XXX + " " + phase + " " + XXX );
    }

}

Enable logger only if system property is activated.
Enable logger only if system property is activated.
