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.AuditLogSpec;
25 import org.onap.dcae.utils.eelf.logger.api.spec.OptionalLogSpec;
28 * Audit Log captures all log levels supported by audit specifications
30 * @author Rajiv Singla
32 public interface AuditLog {
35 * Logs audit message with provided {@link LogLevelCategory}
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
43 void log(LogLevelCategory logLevelCategory, String message, AuditLogSpec auditLogSpec,
44 OptionalLogSpec optionalLogSpec, String... args);
47 * Logs audit message with provided {@link LogLevelCategory} and with default {@link OptionalLogSpec}
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
54 void log(LogLevelCategory logLevelCategory, String message, AuditLogSpec auditLogSpec, String... args);
58 * Logs audit message with provided INFO {@link LogLevelCategory}
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
65 void info(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
68 * Logs audit message with provided INFO {@link LogLevelCategory} and with default {@link OptionalLogSpec}
70 * @param message log message
71 * @param auditLogSpec audit log spec
72 * @param args argument values for log message interpolation
74 void info(String message, AuditLogSpec auditLogSpec, String... args);
78 * Logs audit message with provided WARN {@link LogLevelCategory}
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
85 void warn(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
88 * Logs audit message with provided WARN {@link LogLevelCategory} and with default {@link OptionalLogSpec}
90 * @param message log message
91 * @param auditLogSpec audit log spec
92 * @param args argument values for log message interpolation
94 void warn(String message, AuditLogSpec auditLogSpec, String... args);
97 * Logs audit message with provided ERROR {@link LogLevelCategory}
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
104 void error(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
107 * Logs audit message with provided ERROR {@link LogLevelCategory} and with default {@link OptionalLogSpec}
109 * @param message log message
110 * @param auditLogSpec audit log spec
111 * @param args argument values for log message interpolation
113 void error(String message, AuditLogSpec auditLogSpec, String... args);
116 * Logs audit message with provided FATAL {@link LogLevelCategory}
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
123 void fatal(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args);
126 * Logs audit message with provided FATAL {@link LogLevelCategory} and with default {@link OptionalLogSpec}
128 * @param message log message
129 * @param auditLogSpec audit log spec
130 * @param args argument values for log message interpolation
132 void fatal(String message, AuditLogSpec auditLogSpec, String... args);