Affects Version/s: None
Fix Version/s: None
Epic Name:Logging RI and examples
As an ONAP component developer, I want reference examples demonstrating best practices.
The purpose of reference examples is to provide canonical examples of the use of key MDCs and attributes, and to provide code examples for use in guidelines. Cross-references can be made between code and guidelines.
The intention is to have:
- A reference component which uses EELF.
- A reference component which uses SLF4J directly, without EELF.
- An existing ONAP component which conforms. (A&AI was suggested).
A key aspect of logging guidelines is the passing of information between components during REST invocation and response. This means examples should consist of TWO ONAP-like components, so as to provide examples of invocation and response.
Other requirements and non-requirements:
- Examples need not implement auth* of any kind.
- Examples need not use Spring Boot, and certainly not AJSC. Just a WAR in a Jetty container will do nicely.
- Provider config should be canonical:
- Examples should read configuration from a file at the standard location.
- Examples should output logfiles to the standard locations
- Examples should include a test suite. Running the test suite should produce and validate logger output.
- Examples should be packaged so as to be runnable in Docker.
This ties in nicely with reference provider configuration for Logback and Log4j. Reference examples need only use one or the other. (And presumably that means Logback). See