2 * ================================================================================
3 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ============LICENSE_END=========================================================
20 package org.onap.dcae.utils.eelf.logger.api.log;
23 import org.onap.dcae.utils.eelf.logger.api.info.LogLevelCategory;
24 import org.onap.dcae.utils.eelf.logger.api.spec.ErrorLogSpec;
25 import org.onap.dcae.utils.eelf.logger.api.spec.OptionalLogSpec;
28 * @author Rajiv Singla
30 public interface ErrorLog {
33 * Logs error message with provided {@link LogLevelCategory}
35 * @param logLevelCategory log level category
36 * @param message log message
37 * @param errorLogSpec error log spec
38 * @param optionalLogSpec optional log spec
39 * @param args argument values for log message interpolation
41 void log(LogLevelCategory logLevelCategory, String message, ErrorLogSpec errorLogSpec,
42 OptionalLogSpec optionalLogSpec, String... args);
45 * Logs error message with provided {@link LogLevelCategory} and with default {@link OptionalLogSpec}
47 * @param logLevelCategory log level category
48 * @param message log message
49 * @param errorLogSpec error log spec
50 * @param args argument values for log message interpolation
52 void log(LogLevelCategory logLevelCategory, String message, ErrorLogSpec errorLogSpec, String... args);
56 * Logs error message with ERROR {@link LogLevelCategory}
58 * @param message log message
59 * @param errorLogSpec error log spec
60 * @param optionalLogSpec optional log spec
61 * @param args argument values for log message interpolation
63 void error(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
66 * Logs error message with ERROR {@link LogLevelCategory} and with default {@link OptionalLogSpec}
68 * @param message log message
69 * @param errorLogSpec error log spec
70 * @param args argument values for log message interpolation
72 void error(String message, ErrorLogSpec errorLogSpec, String... args);
76 * Logs error message with WARN {@link LogLevelCategory}
78 * @param message log message
79 * @param errorLogSpec error log spec
80 * @param optionalLogSpec optional log spec
81 * @param args argument values for log message interpolation
83 void warn(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
86 * Logs error message with WARN {@link LogLevelCategory} and with default {@link OptionalLogSpec}
88 * @param message log message
89 * @param errorLogSpec error log spec
90 * @param args argument values for log message interpolation
92 void warn(String message, ErrorLogSpec errorLogSpec, String... args);