package com.avg.zaap.crashlibrary.core.logger;

/**
 * This interfaces defines the required common behavior for all loggers using the crash library.
 * <p/>
 * Created by marek.osvald on 11. 4. 2016.
 */
public interface ILogger {

    /**
     * Send a VERBOSE log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     */
    void v(final String tag, final String message);

    /**
     * Send a VERBOSE log message and log the exception.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     * @param tr      An exception to log
     */
    void v(final String tag, final String message, final Throwable tr);

    /**
     * Send a DEBUG log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     */
    void d(final String tag, final String message);

    /**
     * Send a DEBUG log message and log the exception.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     * @param tr      An exception to log
     */
    void d(final String tag, final String message, final Throwable tr);

    /**
     * Send an INFO log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     */
    void i(final String tag, final String message);

    /**
     * Send an INFO log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     * @param tr      An exception to log
     */
    void i(final String tag, final String message, final Throwable tr);

    /**
     * Send a WARN log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     */
    void w(final String tag, final String message);

    /**
     * Log the exception.
     *
     * @param tag Used to identify the source of a log message. It usually identifies the class or
     *            activity where the log call occurs.
     * @param tr  An exception to log
     */
    void w(final String tag, final Throwable tr);

    /**
     * Send a WARN log message and log the exception.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     * @param tr      An exception to log
     */
    void w(final String tag, final String message, final Throwable tr);

    /**
     * Send an ERROR log message.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     */
    void e(final String tag, final String message);

    /**
     * Send a ERROR log message and log the exception.
     *
     * @param tag     Used to identify the source of a log message. It usually identifies the class
     *                or activity where the log call occurs.
     * @param message The message you would like logged.
     * @param tr      An exception to log
     */
    void e(final String tag, final String message, final Throwable tr);

    /**
     * What a Terrible Failure: Report a condition that should never happen. The error will always
     * be logged at level ASSERT with the call stack. Depending on system configuration, a report
     * may be added to the DropBoxManager and/or the process may be terminated immediately with an
     * error dialog.
     *
     * @param tag     Used to identify the source of a log message.
     * @param message The message you would like logged.
     */
    void wtf(final String tag, final String message);

    /**
     * What a Terrible Failure: Report an exception that should never happen. Similar to
     * wtf(String, String), with an exception to log.
     *
     * @param tag Used to identify the source of a log message.
     * @param tr  An exception to log.
     */
    void wtf(final String tag, final Throwable tr);

    /**
     * What a Terrible Failure: Report an exception that should never happen. Similar to
     * wtf(String, Throwable), with a message as well.
     *
     * @param tag     Used to identify the source of a log message.
     * @param message The message you would like logged.
     * @param tr      An exception to log. May be null.
     */
    void wtf(final String tag, final String message, final Throwable tr);

}
