2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.common.log.api;
23 import org.openecomp.sdc.common.log.enums.Severity;
26 * Created by dd4296 on 12/25/2017.
28 public interface ILogFieldsHandler {
29 void startAuditTimer();
31 void startMetricTimer();
33 void stopAuditTimer();
35 void stopMetricTimer();
37 void setClassName(String className);
39 void setServerFQDN(String serverFQDN);
41 void setServerIPAddress(String serverIPAddress);
43 // intended for setting this parameter in a given thread
44 void setServerFQDNInternally();
46 // intended for setting this parameter in a given thread
47 void setServerIPAddressInternally();
49 void setInstanceUUID(String instanceUUID);
51 void setProcessKey(String processKey);
53 void setAlertSeverity(Severity alertSeverity);
55 void setOptCustomField1(String customField1);
57 void setOptCustomField2(String customField2);
59 void setOptCustomField3(String customField3);
61 void setOptCustomField4(String customField4);
63 void setKeyRequestId(String keyRequestId);
65 void setRemoteHost(String remoteHost);
67 void setServiceName(String serviceName);
69 void setStatusCode(String statusCode);
71 void setPartnerName(String partnerName);
73 void setResponseCode(int responseCode);
75 void setResponseDesc(String responseDesc);
77 void setServiceInstanceId(String serviceInstanceId);
79 void setTargetEntity(String targetEntity);
81 void setTargetServiceName(String targetServiceName);
83 void setTargetVirtualEntity(String targetVirtualEntity);
85 void setErrorCode(int errorCode);
87 void setErrorCategory(String errorCategory);
89 String getErrorCode();
91 String getServiceName();
93 String getErrorCategory();
97 boolean isMDCParamEmpty(String mdcKeyName);
101 String getHostAddress();
103 String getKeyRequestId();
105 void removeStatusCode();
107 void removePartnerName();
109 void removeResponseCode();
111 void removeResponseDesc();
113 void removeServiceInstanceId();
115 void removeTargetEntity();
117 void removeTargetServiceName();
119 void removeTargetVirtualEntity();
121 void removeErrorCode();
123 void removeErrorCategory();
125 void removeErrorDescription();
127 void setAuditMessage(String message);
129 String getAuditMessage();