TCAGen2 java upgrade
[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 optionalLogSpec optional log spec
61      * @param args argument values for log message interpolation
62      */
63     void error(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
64
65     /**
66      * Logs error message with ERROR {@link LogLevelCategory} and with default {@link OptionalLogSpec}
67      *
68      * @param message log message
69      * @param errorLogSpec error log spec
70      * @param args argument values for log message interpolation
71      */
72     void error(String message, ErrorLogSpec errorLogSpec, String... args);
73
74
75     /**
76      * Logs error message with WARN {@link LogLevelCategory}
77      *
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
82      */
83     void warn(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args);
84
85     /**
86      * Logs error message with WARN {@link LogLevelCategory} and with default {@link OptionalLogSpec}
87      *
88      * @param message log message
89      * @param errorLogSpec error log spec
90      * @param args argument values for log message interpolation
91      */
92     void warn(String message, ErrorLogSpec errorLogSpec, String... args);
93
94
95 }