Table of Contents |
---|
...
Note there are 3 tabs (see p_mak in logback.xml) delimiting the MARKERS (ENTRY and EXIT) at the end of each line
<property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
Code Block | ||||
---|---|---|---|---|
| ||||
2018-07-05T20:21:34.794Z http-nio-8080-exec-2 INFO org.onap.demo.logging.ApplicationService InstanceID=ede7dd52-91e8-45ce-9406-fbafd17a7d4c, RequestID=f9d8bb0f-4b4b-4700-9853-d3b79d861c5b, ServiceName=/logging-demo/rest/health/health, InvocationID=8f4c1f1d-5b32-4981-b658-e5992f28e6c8, InvokeTimestamp=2018-07-05T20:21:26.617Z, PartnerName=, ClientIPAddress=0:0:0:0:0:0:0:1, ServerFQDN=localhost ENTRY 2018-07-05T20:22:09.268Z http-nio-8080-exec-2 INFO org.onap.demo.logging.ApplicationService ResponseCode=, InstanceID=ede7dd52-91e8-45ce-9406-fbafd17a7d4c, RequestID=f9d8bb0f-4b4b-4700-9853-d3b79d861c5b, ServiceName=/logging-demo/rest/health/health, ResponseDescription=, InvocationID=8f4c1f1d-5b32-4981-b658-e5992f28e6c8, Severity=, InvokeTimestamp=2018-07-05T20:21:26.617Z, PartnerName=, ClientIPAddress=0:0:0:0:0:0:0:1, ServerFQDN=localhost, StatusCode= EXIT |
...
Logs on each filebeat docker container sidecar - /var/log/onap
...
New ONAP Component Checklist
Add this procedure to the Project Proposal Template
By following a few simple rules:
- Your component's output will be indexed automatically.
- Analytics will be able to trace invocation through your component.
Obligations fall into two categories:
- Conventions regarding configuration, line format and output.
- Ensuring the propagation of contextual information.
You must:
- Choose a Logging provider and/or EELF. Decisions, decisions.
- Create a configuration file based on an existing archetype. See 48534506.
- Read your configuration file when your components initialize logging.
- Write logs to a standard location so that they can be shipped by Filebeat for indexing. See 48534506.
- Report transaction state:
- Write useful logs!
They are unordered.
What's New
(Including what WILL be new in v1.2 / R2).
- Field separator reverted to pipe.
- Dual appenders in Logback and Log4j reference configurations:
- Indexable, for shipping and indexing.
- EELF, for backward compatibility.
- Minor changes to path conventions.
- XML output deprecated (required only for Log4j1.2, which is also expected to go).
- Improved documentation of semantics and usage (including initialization and propagation via ThreadLocaland HTTP headers) for existing MDCs and attributes.
- Add MDCs/Markers + usage for invocation IDs, allowing call graphs to be built without reliance on heuristics.
- Revisiting persistence (a clear requirement) and rollover settings, based on feedback from operations.
- More discussion of How to Log. (Where previously guidelines were largely concerned with architecture and mechanics).
- Locking in other changes proposed in R1, including MDC serialization, escaping, etc. These can be treated as accepted. (Note that they only affect indexable output).
In addition, we expect to provide (as a Beijing deliverable) a minimal, synthetic component as an example of best-practices, and this will provide all code examples for this guide. (Does that mean the example will log via EELF, or will we end up with two variants?)
Pending Specification Work
id | date | item | details | status |
---|---|---|---|---|
20180614 | MDC ClientIPAddress | Ask question of OPS to remove this field - 20180419 | todo | |
20180614 | MDC ResponseCode / ResponseDescription | expand/find note 1* | todo |
Developer Guide
see separate page (cross releases) in Logging Developer Guide