Standalone TCA with EELF Logger
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-api / src / main / java / org / onap / dcae / utils / eelf / logger / api / log / ErrorLog.java
1 /*
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
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
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=========================================================
17  *
18  */
19
20 package org.onap.dcae.utils.eelf.logger.api.log;
21
22
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;
26
27 /**
28  * @author Rajiv Singla
29  */
30 public interface ErrorLog {
31
32     /**
33      * Logs error message with provided {@link LogLevelCategory}
34      *
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
40      */
41     void log(LogLevelCategory logLevelCategory, String message, ErrorLogSpec errorLogSpec,
42              OptionalLogSpec optionalLogSpec, String... args);
43
44     /**
45      * Logs error message with provided {@link LogLevelCategory} and with default {@link OptionalLogSpec}
46      *
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
51      */
52     void log(LogLevelCategory logLevelCategory, String message, ErrorLogSpec errorLogSpec, String... args);
53
54
55     /**
56      * Logs error message with ERROR {@link LogLevelCategory}
57      *
58      * @param message log message
59      * @param errorLogSpec error log spec
60      * @param args argument values for log message interpolation
61      */
62     void error(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
63
64     /**
65      * Logs error message with ERROR {@link LogLevelCategory} and with default {@link OptionalLogSpec}
66      *
67      * @param message log message
68      * @param errorLogSpec error log spec
69      * @param args argument values for log message interpolation
70      */
71     void error(String message, ErrorLogSpec errorLogSpec, String... args);
72
73
74     /**
75      * Logs error message with WARN {@link LogLevelCategory}
76      *
77      * @param message log message
78      * @param errorLogSpec error log spec
79      * @param args argument values for log message interpolation
80      */
81     void warn(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
82
83     /**
84      * Logs error message with WARN {@link LogLevelCategory} and with default {@link OptionalLogSpec}
85      *
86      * @param message log message
87      * @param errorLogSpec error log spec
88      * @param args argument values for log message interpolation
89      */
90     void warn(String message, ErrorLogSpec errorLogSpec, String... args);
91
92
93 }