2 * Copyright © 2016-2018 European Support Limited
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openecomp.sdc.logging.api;
20 * <p>This interface defines logging as specified by ONAP logging requirements.</p>
22 * <p>Formatted messages must follow the <a href="http://www.slf4j.org/api/org/slf4j/helpers/MessageFormatter.html>SLF4J
28 public interface Logger {
32 boolean isMetricsEnabled();
34 void metrics(MetricsData data);
37 * Kept for backward compatibility.
39 * @deprecated will be removed soon, {@link #metrics(MetricsData)} must be used instead
42 void metrics(String msg);
44 boolean isAuditEnabled();
46 void audit(AuditData data);
48 boolean isDebugEnabled();
50 void debug(String msg);
52 void debug(String msg, Object arg);
54 void debug(String msg, Object arg1, Object arg2);
56 void debug(String msg, Object... arguments);
58 void debug(String msg, Throwable t);
60 boolean isInfoEnabled();
62 void info(String msg);
64 void info(String msg, Object arg);
66 void info(String msg, Object arg1, Object arg2);
68 void info(String msg, Object... arguments);
70 void info(String msg, Throwable t);
72 boolean isWarnEnabled();
74 void warn(String msg);
76 void warn(String msg, Object arg);
78 void warn(String msg, Object... arguments);
80 void warn(String msg, Object arg1, Object arg2);
82 void warn(String msg, Throwable t);
84 boolean isErrorEnabled();
86 void error(String msg);
88 void error(String msg, Object arg);
90 void error(String msg, Object arg1, Object arg2);
92 void error(String msg, Object... arguments);
94 void error(String msg, Throwable t);