summaryrefslogtreecommitdiffstats
path: root/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec
diff options
context:
space:
mode:
Diffstat (limited to 'eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec')
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AppLogSpec.java32
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AuditLogSpec.java42
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/DebugLogSpec.java34
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/ErrorLogSpec.java42
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/MetricLogSpec.java36
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/OptionalLogSpec.java39
-rw-r--r--eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/package-info.java28
7 files changed, 253 insertions, 0 deletions
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AppLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AppLogSpec.java
new file mode 100644
index 0000000..83643fb
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AppLogSpec.java
@@ -0,0 +1,32 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+
+import org.onap.dcae.utils.eelf.logger.api.info.AppLogInfo;
+
+/**
+ * App Log spec captures fields which are fixed for the duration of application once its instance is created. They
+ * should be populated for all specifications regardless of if they are relevant to that specification
+ *
+ * @author Rajiv Singla
+ */
+public interface AppLogSpec extends AppLogInfo {
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AuditLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AuditLogSpec.java
new file mode 100644
index 0000000..46360b1
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/AuditLogSpec.java
@@ -0,0 +1,42 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+
+import org.onap.dcae.utils.eelf.logger.api.info.RequestIdLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.RequestTimingLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.ResponseLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.ServiceLogInfo;
+
+/**
+ * Captures fields required for EELF Audit Log Specification.
+ *
+ * @author Rajiv Singla
+ */
+public interface AuditLogSpec extends
+ // request id must be preset for all log specifications
+ RequestIdLogInfo,
+ // duration related fields
+ RequestTimingLogInfo,
+ // app acting as a service fields
+ ServiceLogInfo, ResponseLogInfo {
+
+
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/DebugLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/DebugLogSpec.java
new file mode 100644
index 0000000..ac4bd64
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/DebugLogSpec.java
@@ -0,0 +1,34 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+
+import org.onap.dcae.utils.eelf.logger.api.info.RequestIdLogInfo;
+
+/**
+ * Captures fields required for EELF Debug Log Specification.
+ * NOTE: As per specification debug log is optional
+ *
+ * @author Rajiv Singla
+ */
+public interface DebugLogSpec extends
+ // request id must be preset for all log specifications
+ RequestIdLogInfo {
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/ErrorLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/ErrorLogSpec.java
new file mode 100644
index 0000000..455f433
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/ErrorLogSpec.java
@@ -0,0 +1,42 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+
+import org.onap.dcae.utils.eelf.logger.api.info.ErrorLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.RequestIdLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.ServiceLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.TargetServiceLogInfo;
+
+/**
+ * Captures fields required for EELF Error Log Specification
+ *
+ * @author Rajiv Singla
+ */
+public interface ErrorLogSpec extends
+ // request id must be preset for all log specifications
+ RequestIdLogInfo,
+ // app acting as a service fields
+ ServiceLogInfo,
+ // app calling external service fields
+ TargetServiceLogInfo,
+ // error details fields
+ ErrorLogInfo {
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/MetricLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/MetricLogSpec.java
new file mode 100644
index 0000000..5b5f698
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/MetricLogSpec.java
@@ -0,0 +1,36 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+
+import org.onap.dcae.utils.eelf.logger.api.info.TargetServiceLogInfo;
+
+/**
+ * Captures fields required for EELF Metric Log Specification.
+ *
+ * @author Rajiv Singla
+ */
+public interface MetricLogSpec extends
+ // Audit log spec
+ AuditLogSpec,
+ // App calling external service fields
+ TargetServiceLogInfo {
+
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/OptionalLogSpec.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/OptionalLogSpec.java
new file mode 100644
index 0000000..dac08ab
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/OptionalLogSpec.java
@@ -0,0 +1,39 @@
+/*
+ * ================================================================================
+ * 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.spec;
+
+import org.onap.dcae.utils.eelf.logger.api.info.CodeLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.CustomFieldsLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.MessageLogInfo;
+import org.onap.dcae.utils.eelf.logger.api.info.MiscLogInfo;
+
+/**
+ * Captures fields which are optional or derived from other fields
+ *
+ * @author Rajiv Singla
+ */
+public interface OptionalLogSpec extends
+ // message fields are mostly auto generated or can be derived from other fields
+ MessageLogInfo,
+ // Code log info can be derived by the underlying logging framework or provided optionally by the app
+ CodeLogInfo,
+ // custom and misc log info are mostly optional
+ CustomFieldsLogInfo, MiscLogInfo {
+}
diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/package-info.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/package-info.java
new file mode 100644
index 0000000..b4c1df8
--- /dev/null
+++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/spec/package-info.java
@@ -0,0 +1,28 @@
+/*
+ * ================================================================================
+ * 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=========================================================
+ *
+ */
+
+/**
+ * Contains various EELF Logging Specifications.
+ * <p>
+ * Some specifications are fixed for the whole duration of the
+ * application, some specification are either optional or derived and some are required for particular EELF Logging
+ * specification. These logging specification are composed of various logging information in
+ * {@link org.onap.dcae.utils.eelf.logger.api.info} package
+ */
+package org.onap.dcae.utils.eelf.logger.api.spec;