From eaeba3db217233dd20972f2d3d8a094d44ce0637 Mon Sep 17 00:00:00 2001 From: "Singla, Rajiv (rs153v)" Date: Wed, 25 Jul 2018 12:04:38 -0400 Subject: Initial commit for EELF Logger Issue-ID: DCAEGEN2-633 Change-Id: I108929219d2d6570080d2fe7792cbc5a6530bb59 Signed-off-by: Singla, Rajiv (rs153v) --- .../utils/eelf/logger/api/info/AppLogInfo.java | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java (limited to 'eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java') diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java new file mode 100644 index 0000000..bdce8d1 --- /dev/null +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java @@ -0,0 +1,101 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ + +package org.onap.dcae.utils.eelf.logger.api.info; + +/** + * Captures information about application which is doing the logging. All app log fields must remain same for + * the whole duration of the application once its instance is created. + * + * @author Rajiv Singla + */ +public interface AppLogInfo extends LogInfo { + + /** + * Required field contains UUID which identifies this service instance inside an inventory management system + * (e.g. A&AI) to reference/manage this service as a unit + * + * @return remote VM Name or service the request is acting upon. + */ + String getServiceInstanceID(); + + /** + * Required field contains a universally unique identifier used to differentiate between multiple instances of + * the same (named), log writing service/application. Its value is set at instance creation time (and read by it, + * e.g. at start/initialization time from the environment). This value should be picked up by the component + * instance from its configuration file and subsequently used to enable differentiating log records created by + * multiple, locally load balanced EELF component or sub component instances that are otherwise identically + * configured. + * + * @return instance UUID + */ + String getInstanceUUID(); + + /** + * Optional field contains VM Name where app is deployed. + * DCAE sub components should populate this field but it can be empty if + * determined that its value can be added by the log files collecting agent itself (e.g. Splunk). + *

+ * Example: host.vm.name.com + *

+ * + * @return virtual server name + */ + String getVirtualServerName(); + + /** + * Optional field contains the logging component host server’s IP address. + *

+ * Example: 127.0.0.100 + *

+ * + * @return server ip address + */ + String getServerIPAddress(); + + /** + * Required field for VM's fully qualified domain name or hosting machine fully qualified domain name. + *

+ * Example: host.fqdn.com + *

+ * + * @return server host fully qualified domain name + */ + String getServerFQDN(); + + + /** + * Contains default values for {@link AppLogInfo} + */ + interface Defaults { + + String DEFAULT_SERVICE_INSTANCE_ID = "UNKNOWN_INSTANCE_ID"; + + String DEFAULT_INSTANCE_UUID = ""; + + String DEFAULT_VIRTUAL_SERVER_NAME = ""; + + String DEFAULT_SERVER_IP_ADDRESS = "UNKNOWN_IP_ADDRESS"; + + String DEFAULT_SERVER_FQDN = "UNKNOWN_SERVER_FQDN"; + + } + + +} -- cgit 1.2.3-korg