TCAGen2 java upgrade
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-api / src / main / java / org / onap / dcae / utils / eelf / logger / api / info / AppLogInfo.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  *  Captures information about application which is doing the logging. All app log fields must remain same for
24  *  the whole duration of the application once its instance is created.
25  *
26  * @author Rajiv Singla
27  */
28 public interface AppLogInfo extends LogInfo {
29
30     /**
31      * Required field contains UUID which identifies this service instance inside an inventory management system
32      * to reference/manage this service as a unit
33      *
34      * @return remote VM Name or service the request is acting upon.
35      */
36     String getServiceInstanceID();
37
38     /**
39      * Required field contains a universally unique identifier used to differentiate between multiple instances of
40      * the same (named), log writing service/application. Its value is set at instance creation time (and read by it,
41      * e.g. at start/initialization time from the environment).  This value should be picked up by the component
42      * instance from its configuration file and subsequently used to enable differentiating log records created by
43      * multiple, locally load balanced EELF component or sub component instances that are otherwise identically
44      * configured.
45      *
46      * @return instance UUID
47      */
48     String getInstanceUUID();
49
50     /**
51      * Optional field contains VM Name where app is deployed.
52      * DCAE sub components should populate this field but it can be empty if
53      * determined that its value can be added by the log files collecting agent itself (e.g. Splunk).
54      * <p>
55      * <b> Example: host.vm.name.com</b>
56      * </p>
57      *
58      * @return virtual server name
59      */
60     String getVirtualServerName();
61
62     /**
63      * Optional field contains the logging component host server’s IP address.
64      * <p>
65      * <b>Example: 127.0.0.100</b>
66      * </p>
67      *
68      * @return server ip address
69      */
70     String getServerIPAddress();
71
72     /**
73      * Required field for VM's fully qualified domain name or hosting machine fully qualified domain name.
74      * <p>
75      * <b> Example: host.fqdn.com</b>
76      * </p>
77      *
78      * @return server host fully qualified domain name
79      */
80     String getServerFQDN();
81
82
83     /**
84      * Contains default values for {@link AppLogInfo}
85      */
86     interface Defaults {
87
88         String DEFAULT_SERVICE_INSTANCE_ID = "UNKNOWN_INSTANCE_ID";
89
90         String DEFAULT_INSTANCE_UUID = "";
91
92         String DEFAULT_VIRTUAL_SERVER_NAME = "";
93
94         String DEFAULT_SERVER_IP_ADDRESS = "UNKNOWN_IP_ADDRESS";
95
96         String DEFAULT_SERVER_FQDN = "UNKNOWN_SERVER_FQDN";
97
98     }
99
100
101 }