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

com.atlassian.bamboo.specs.util.LogUtils Maven / Gradle / Ivy

There is a newer version: 10.1.0
Show newest version
package com.atlassian.bamboo.specs.util;

import com.atlassian.bamboo.specs.util.Logger.LogLevel;
import org.jetbrains.annotations.NotNull;

public final class LogUtils {
    private LogUtils() {
    }

    /**
     * Logs a hint to enable more detailed logging to obtain additional information. If the logger is at sufficient
     * details level, this method does nothing.
     *
     * @param log            an instance of the logger
     * @param suggestedLevel suggested level of logging for additional information
     */
    public static void hintLogLevel(@NotNull Logger log, @NotNull LogLevel suggestedLevel) {
        if (!Logger.LOG_LEVEL.shouldLog(suggestedLevel)) {
            log.info("(for more information, enable more detailed logging with system property -D%s=%s)", Logger.LOG_LEVEL_PROPERTY, suggestedLevel.name());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy