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

org.apache.james.protocols.api.logger.Logger Maven / Gradle / Ivy

There is a newer version: 3.8.1
Show newest version
/****************************************************************
 * Licensed to the Apache Software Foundation (ASF) under one   *
 * or more contributor license agreements.  See the NOTICE file *
 * distributed with this work for additional information        *
 * regarding copyright ownership.  The ASF licenses this file   *
 * to you under the Apache License, Version 2.0 (the            *
 * "License"); you may not use this file except in compliance   *
 * with the License.  You may obtain a copy of the License at   *
 *                                                              *
 *   http://www.apache.org/licenses/LICENSE-2.0                 *
 *                                                              *
 * Unless required by applicable law or agreed to in writing,   *
 * software distributed under the License is distributed on an  *
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
 * KIND, either express or implied.  See the License for the    *
 * specific language governing permissions and limitations      *
 * under the License.                                           *
 ****************************************************************/


package org.apache.james.protocols.api.logger;

public interface Logger {

    /**
     * 

Is debug logging currently enabled?

* *

Call this method to prevent having to perform expensive operations * (for example, String concatenation) * when the log level is more than debug.

* * @return true if debug is enabled in the underlying logger. */ boolean isDebugEnabled(); /** *

Is error logging currently enabled?

* *

Call this method to prevent having to perform expensive operations * (for example, String concatenation) * when the log level is more than error.

* * @return true if error is enabled in the underlying logger. */ boolean isErrorEnabled(); /** *

Is info logging currently enabled?

* *

Call this method to prevent having to perform expensive operations * (for example, String concatenation) * when the log level is more than info.

* * @return true if info is enabled in the underlying logger. */ boolean isInfoEnabled(); /** *

Is trace logging currently enabled?

* *

Call this method to prevent having to perform expensive operations * (for example, String concatenation) * when the log level is more than trace.

* * @return true if trace is enabled in the underlying logger. */ boolean isTraceEnabled(); /** *

Is warn logging currently enabled?

* *

Call this method to prevent having to perform expensive operations * (for example, String concatenation) * when the log level is more than warn.

* * @return true if warn is enabled in the underlying logger. */ boolean isWarnEnabled(); /** *

Log a message with trace log level.

* * @param message log this message */ void trace(String message); /** *

Log an error with trace log level.

* * @param message log this message * @param t log this cause */ void trace(String message, Throwable t); /** *

Log a message with debug log level.

* * @param message log this message */ void debug(String message); /** *

Log an error with debug log level.

* * @param message log this message * @param t log this cause */ void debug(String message, Throwable t); /** *

Log a message with info log level.

* * @param message log this message */ void info(String message); /** *

Log an error with info log level.

* * @param message log this message * @param t log this cause */ void info(String message, Throwable t); /** *

Log a message with warn log level.

* * @param message log this message */ void warn(String message); /** *

Log an error with warn log level.

* * @param message log this message * @param t log this cause */ void warn(String message, Throwable t); /** *

Log a message with error log level.

* * @param message log this message */ void error(String message); /** *

Log an error with error log level.

* * @param message log this message * @param t log this cause */ void error(String message, Throwable t); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy