Added oparent to sdc main
[sdc.git] / openecomp-be / lib / openecomp-sdc-logging-lib / openecomp-sdc-logging-api / src / main / java / org / openecomp / sdc / logging / api / package-info.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * <p>Client-visible API for logging, implemented according to
19  * <a href="https://wiki.onap.org/download/attachments/1015849/ONAP%20application%20logging%20guidelines.pdf?api=v2">
20  * ONAP application logging guidelines</a>. The actual implementation is delegated to a service provider bound through
21  * the <a href="https://docs.oracle.com/javase/tutorial/ext/basics/spi.html">Java SPI</a> mechanism. The provider must
22  * implement {@link org.openecomp.sdc.logging.spi.LoggingServiceProvider}.</p>
23  * <p>The logging API collects the following types of data:</p>
24  * <ol>
25  *     <li>Context that must be propagated throughout the application, and available at any point for debug and error
26  *     reporting.</li>
27  *     <li>Audit data, reflecting the invocation of a local, usually REST, API.</li>
28  *     <li>Metrics data, reflecting the invocation of a remote API by current system (component).</li>
29  * </ol>
30  * <p>The construction of all three types of data follows the same pattern for consistency. The builder pattern has
31  * been chosen over an interface to enable to gracefully add new fields without affecting the client code. Also, the
32  * builder can be implemented differently if needed, also without affecting client code. For instance, it may delegate
33  * the instantiation and population of a data object to the service provider.</p>
34  *
35  * @author evitaliy
36  * @since 26 Mar 2018
37  */
38 package org.openecomp.sdc.logging.api;