Loggable$class.java 2.63 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.slf4j.Logger
 *  org.slf4j.LoggerFactory
 *  scala.Function0
 */
package com.adobe.forms.logging;

import com.adobe.forms.logging.Loggable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.Function0;

public abstract class Loggable$class {
    public static Logger logger(Loggable $this) {
        return LoggerFactory.getLogger($this.getClass());
    }

    public static boolean debug_$qmark(Loggable $this) {
        return $this.logger().isDebugEnabled();
    }

    public static boolean info_$qmark(Loggable $this) {
        return $this.logger().isInfoEnabled();
    }

    public static boolean warn_$qmark(Loggable $this) {
        return $this.logger().isWarnEnabled();
    }

    public static boolean error_$qmark(Loggable $this) {
        return $this.logger().isErrorEnabled();
    }

    public static void debug(Loggable $this, Function0 msg, Function0 t) {
        if ($this.debug_$qmark()) {
            if (t.apply() == null) {
                $this.logger().debug(msg.apply().toString());
            } else {
                $this.logger().debug(msg.apply().toString(), (Throwable)t.apply());
            }
        }
    }

    public static Throwable debug$default$2(Loggable $this) {
        return null;
    }

    public static void info(Loggable $this, Function0 msg, Function0 t) {
        if ($this.info_$qmark()) {
            if (t.apply() == null) {
                $this.logger().info(msg.apply().toString());
            } else {
                $this.logger().info(msg.apply().toString(), (Throwable)t.apply());
            }
        }
    }

    public static Throwable info$default$2(Loggable $this) {
        return null;
    }

    public static void warn(Loggable $this, Function0 msg, Function0 t) {
        if ($this.warn_$qmark()) {
            if (t.apply() == null) {
                $this.logger().warn(msg.apply().toString());
            } else {
                $this.logger().warn(msg.apply().toString(), (Throwable)t.apply());
            }
        }
    }

    public static Throwable warn$default$2(Loggable $this) {
        return null;
    }

    public static void error(Loggable $this, Function0 msg, Function0 t) {
        if ($this.error_$qmark()) {
            if (t.apply() == null) {
                $this.logger().error(msg.apply().toString());
            } else {
                $this.logger().error(msg.apply().toString(), (Throwable)t.apply());
            }
        }
    }

    public static Throwable error$default$2(Loggable $this) {
        return null;
    }

    public static void $init$(Loggable $this) {
    }
}