Added oparent to sdc main
[sdc.git] / openecomp-be / lib / openecomp-sdc-logging-lib / openecomp-sdc-logging-api / src / main / java / org / openecomp / sdc / logging / api / Logger.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdc.logging.api;
18
19 /**
20  * <p>This interface defines logging as specified by ONAP logging requirements.</p>
21  *
22  * <p>Formatted messages must follow the <a href="http://www.slf4j.org/api/org/slf4j/helpers/MessageFormatter.html>SLF4J
23  * format</a>.</p>
24  *
25  * @author evitaliy
26  * @since 13/09/2016.
27  */
28 public interface Logger {
29
30     String getName();
31
32     boolean isMetricsEnabled();
33
34     void metrics(MetricsData data);
35
36     /**
37      * Kept for backward compatibility.
38      *
39      * @deprecated will be removed soon, {@link #metrics(MetricsData)} must be used instead
40      */
41     @Deprecated
42     void metrics(String msg);
43
44     boolean isAuditEnabled();
45
46     void audit(AuditData data);
47
48     boolean isDebugEnabled();
49
50     void debug(String msg);
51
52     void debug(String msg, Object arg);
53
54     void debug(String msg, Object arg1, Object arg2);
55
56     void debug(String msg, Object... arguments);
57
58     void debug(String msg, Throwable t);
59
60     boolean isInfoEnabled();
61
62     void info(String msg);
63
64     void info(String msg, Object arg);
65
66     void info(String msg, Object arg1, Object arg2);
67
68     void info(String msg, Object... arguments);
69
70     void info(String msg, Throwable t);
71
72     boolean isWarnEnabled();
73
74     void warn(String msg);
75
76     void warn(String msg, Object arg);
77
78     void warn(String msg, Object... arguments);
79
80     void warn(String msg, Object arg1, Object arg2);
81
82     void warn(String msg, Throwable t);
83
84     boolean isErrorEnabled();
85
86     void error(String msg);
87
88     void error(String msg, Object arg);
89
90     void error(String msg, Object arg1, Object arg2);
91
92     void error(String msg, Object... arguments);
93
94     void error(String msg, Throwable t);
95 }