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.info;
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.
26 * @author Rajiv Singla
28 public interface AppLogInfo extends LogInfo {
31 * Required field contains UUID which identifies this service instance inside an inventory management system
32 * to reference/manage this service as a unit
34 * @return remote VM Name or service the request is acting upon.
36 String getServiceInstanceID();
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
46 * @return instance UUID
48 String getInstanceUUID();
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).
55 * <b> Example: host.vm.name.com</b>
58 * @return virtual server name
60 String getVirtualServerName();
63 * Optional field contains the logging component host server’s IP address.
65 * <b>Example: 127.0.0.100</b>
68 * @return server ip address
70 String getServerIPAddress();
73 * Required field for VM's fully qualified domain name or hosting machine fully qualified domain name.
75 * <b> Example: host.fqdn.com</b>
78 * @return server host fully qualified domain name
80 String getServerFQDN();
84 * Contains default values for {@link AppLogInfo}
88 String DEFAULT_SERVICE_INSTANCE_ID = "UNKNOWN_INSTANCE_ID";
90 String DEFAULT_INSTANCE_UUID = "";
92 String DEFAULT_VIRTUAL_SERVER_NAME = "";
94 String DEFAULT_SERVER_IP_ADDRESS = "UNKNOWN_IP_ADDRESS";
96 String DEFAULT_SERVER_FQDN = "UNKNOWN_SERVER_FQDN";