TCAGen2 java upgrade
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-api / src / main / java / org / onap / dcae / utils / eelf / logger / api / log / AuditLog.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.AuditLogSpec;
25 import org.onap.dcae.utils.eelf.logger.api.spec.OptionalLogSpec;
26
27 /**
28  * Audit Log captures all log levels supported by audit specifications
29  *
30  * @author Rajiv Singla
31  */
32 public interface AuditLog {
33
34     /**
35      * Logs audit message with provided {@link LogLevelCategory}
36      *
37      * @param logLevelCategory log level category
38      * @param message log message
39      * @param auditLogSpec audit log spec
40      * @param optionalLogSpec optional log spec
41      * @param args argument values for log message interpolation
42      */
43     void log(LogLevelCategory logLevelCategory, String message, AuditLogSpec auditLogSpec,
44              OptionalLogSpec optionalLogSpec, String... args);
45
46     /**
47      * Logs audit message with provided {@link LogLevelCategory} and with default {@link OptionalLogSpec}
48      *
49      * @param logLevelCategory log level category
50      * @param message log message
51      * @param auditLogSpec audit log spec
52      * @param args argument values for log message interpolation
53      */
54     void log(LogLevelCategory logLevelCategory, String message, AuditLogSpec auditLogSpec, String... args);
55
56
57     /**
58      * Logs audit message with provided INFO {@link LogLevelCategory}
59      *
60      * @param message log message
61      * @param auditLogSpec audit log spec
62      * @param optionalLogSpec optional log spec
63      * @param args argument values for log message interpolation
64      */
65     void info(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
66
67     /**
68      * Logs audit message with provided INFO {@link LogLevelCategory} and with default {@link OptionalLogSpec}
69      *
70      * @param message log message
71      * @param auditLogSpec audit log spec
72      * @param args argument values for log message interpolation
73      */
74     void info(String message, AuditLogSpec auditLogSpec, String... args);
75
76
77     /**
78      * Logs audit message with provided WARN {@link LogLevelCategory}
79      *
80      * @param message log message
81      * @param auditLogSpec audit log spec
82      * @param optionalLogSpec optional log spec
83      * @param args argument values for log message interpolation
84      */
85     void warn(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
86
87     /**
88      * Logs audit message with provided WARN {@link LogLevelCategory} and with default {@link OptionalLogSpec}
89      *
90      * @param message log message
91      * @param auditLogSpec audit log spec
92      * @param args argument values for log message interpolation
93      */
94     void warn(String message, AuditLogSpec auditLogSpec, String... args);
95
96     /**
97      * Logs audit message with provided ERROR {@link LogLevelCategory}
98      *
99      * @param message log message
100      * @param auditLogSpec audit log spec
101      * @param optionalLogSpec optional log spec
102      * @param args argument values for log message interpolation
103      */
104     void error(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
105
106     /**
107      * Logs audit message with provided ERROR {@link LogLevelCategory} and with default {@link OptionalLogSpec}
108      *
109      * @param message log message
110      * @param auditLogSpec audit log spec
111      * @param args argument values for log message interpolation
112      */
113     void error(String message, AuditLogSpec auditLogSpec, String... args);
114
115     /**
116      * Logs audit message with provided FATAL {@link LogLevelCategory}
117      *
118      * @param message log message
119      * @param auditLogSpec audit log spec
120      * @param optionalLogSpec optional log spec
121      * @param args argument values for log message interpolation
122      */
123     void fatal(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
124
125     /**
126      * Logs audit message with provided FATAL {@link LogLevelCategory} and with default {@link OptionalLogSpec}
127      *
128      * @param message log message
129      * @param auditLogSpec audit log spec
130      * @param args argument values for log message interpolation
131      */
132     void fatal(String message, AuditLogSpec auditLogSpec, String... args);
133
134 }