aboutsummaryrefslogtreecommitdiffstats
path: root/config-provisioning/src/main/java/com/yahoo/config/provision/ProvisionLogger.java
blob: 9d72f274419425b493ac5d9273f885dbbc3816d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;

import java.util.logging.Level;

/**
 * Allows messages to be logged during provision which will be directed back to the party initiating the request.
 *
 * @author bratseth
 */
public interface ProvisionLogger {

    /** Log a message unrelated to the application package, e.g. internal error/status. */
    void log(Level level, String message);

    /**
     * Log a message related to the application package. These messages should be actionable by the user, f.ex. to
     * signal usage of invalid/deprecated syntax.
     * This default implementation just forwards to {@link #log(Level, String)}
     */
    default void logApplicationPackage(Level level, String message) {
        log(level, message);
    }

}