All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.code.sbt.SBTLogger Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.google.code.sbt;

import org.apache.maven.plugin.logging.Log;
import xsbti.F0;
import xsbti.Logger;

/**
 * Maven Logger wrapper implementing SBT Logger interface.
 */
public class SBTLogger
    implements Logger
{

    Log log;

    public SBTLogger( Log l )
    {
        this.log = l;
    }

    public void error( F0 msg )
    {
        if ( log.isErrorEnabled() )
        {
            log.error( msg.apply() );
        }
    }

    public void warn( F0 msg )
    {
        if ( log.isWarnEnabled() )
        {
            log.warn( msg.apply() );
        }
    }

    public void info( F0 msg )
    {
        if ( log.isInfoEnabled() )
        {
            log.info( msg.apply() );
        }
    }

    public void debug( F0 msg )
    {
        if ( log.isDebugEnabled() )
        {
            log.debug( msg.apply() );
        }
    }

    public void trace( F0 exception )
    {
        if ( log.isDebugEnabled() )
        {
            log.debug( exception.apply() );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy