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 / info / CodeLogInfo.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.info;
21
22 /**
23  * Capture field required to log details about code which is generating the log message.
24  * <p>
25  * <b>NOTE: When using a logging framework(e.g. logback) implementation these fields may be automatically deduced - so
26  * settings these fields is not required by the application and even if application sets these fields the logging
27  * framework may ignore it
28  * </b>
29  * </p>
30  *
31  * @author Rajiv Singla
32  */
33 public interface CodeLogInfo extends LogInfo {
34
35
36     /**
37      * Optional field used if wanting to trace processing of a request over a number of sub-components of a single EELF
38      * component. It should be preceded by a log record that establishes its chaining back to the corresponding
39      * requestID.
40      *
41      * @return thread ID used to trace processing of request over number of sub-components of single EELF Component.
42      */
43     String getThreadId();
44
45
46     /**
47      * Optional field: If available for OO programing languages that support this concept. This is the name of the
48      * class that has caused the log record to be created.
49      *
50      * @return name of the class that has the caused the log record to be created
51      */
52     String getClassName();
53
54
55 }