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

io.github.selcukes.commons.logging.Logger Maven / Gradle / Ivy

/*
 * Copyright (c) Ramesh Babu Prudhvi.
 *
 * Licensed 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 io.github.selcukes.commons.logging;

import java.util.function.Supplier;

/**
 * Logs messages to {@link java.util.logging.Logger}.
 * 
    *
  • {@code error} maps to {@link java.util.logging.Level#SEVERE}
  • *
  • {@code warn} maps to {@link java.util.logging.Level#WARNING}
  • *
  • {@code info} maps to {@link java.util.logging.Level#INFO}
  • *
  • {@code config} maps to {@link java.util.logging.Level#CONFIG}
  • *
  • {@code debug} maps to {@link java.util.logging.Level#FINE}
  • *
  • {@code trace} maps to {@link java.util.logging.Level#FINER}
  • *
*/ public interface Logger { /** * Log the {@code message} at error level. * * @param message The message to log. */ void error(Supplier message); /** * Log the {@code message} and {@code throwable} at error level. * * @param throwable The throwable to log. * @param message The message to log. */ void error(Throwable throwable, Supplier message); /** * Log the {@code message} at warning level. * * @param message The message to log. */ void warn(Supplier message); /** * Log the {@code message} and {@code throwable} at warning level. * * @param throwable The throwable to log. * @param message The message to log. */ void warn(Throwable throwable, Supplier message); /** * Log the {@code message} at info level. * * @param message The message to log. */ void info(Supplier message); /** * Log the {@code message} and {@code throwable} at info level. * * @param throwable The throwable to log. * @param message The message to log. */ void info(Throwable throwable, Supplier message); /** * Log the {@code message} at config level. * * @param message The message to log. */ void config(Supplier message); /** * Log the {@code message} and {@code throwable} at config level. * * @param throwable The throwable to log. * @param message The message to log. */ void config(Throwable throwable, Supplier message); /** * Log the {@code message} at debug level. * * @param message The message to log. */ void debug(Supplier message); /** * Log {@code message} and {@code throwable} at debug level. * * @param throwable The throwable to log. * @param message The message to log. */ void debug(Throwable throwable, Supplier message); /** * Log the {@code message} at trace level. * * @param message The message to log. */ void trace(Supplier message); /** * Log the {@code message} and {@code throwable} at trace level. * * @param throwable The throwable to log. * @param message The message to log. */ void trace(Throwable throwable, Supplier message); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy