Skip to content

Commit 54cfa09

Browse files
committed
add logging options documentation
1 parent 3616f34 commit 54cfa09

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

docs/modules/ROOT/pages/processor/configuration.adoc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ options:
2929
base-path:
3030
server-url: 0
3131
properties-name: api.properties
32+
logging:
33+
mapping: true
34+
mapping-target: stdout
3235
compatibility:
3336
bean-validation-valid-on-reactive: false
3437
identifier-word-break-from-digit-to-letter: false
@@ -378,6 +381,40 @@ options:
378381
layout: standard
379382
----
380383

384+
== logging:
385+
386+
This section contains keys to log the mapping lookup. It may be useful to locate mappings that should be used, but are not.
387+
388+
=== mapping:
389+
390+
**optional** (boolean, `true` or `false`, default is `false`)
391+
392+
enables logging of the mapping lookup.
393+
394+
=== mapping-target:
395+
396+
**optional** (string, `logger` or `stdout`, default is `logger`)
397+
398+
with this option it is possible to control the logging target.
399+
400+
If set to `logger` the mapping lookup gets logged at `info` level to link:https://www.slf4j.org/[slf4j]. If set to `stdout` the mapping lookup gets written directly to `stdout` without slf4j.
401+
402+
==== maven
403+
404+
apart from enabling logging of the mapping lookups in the `mapping.yaml` it is necessary to enable the mapping logger with `io.openapiprocessor.core.converter.mapping` to see any output.
405+
406+
For example by running `maven` with:
407+
408+
----
409+
./mvnw -Dorg.slf4j.simpleLogger.log.io.openapiprocessor.core.converter.mapping=info compile -f pom.xml
410+
----
411+
412+
==== gradle
413+
414+
apart from enabling logging of the mapping lookups in the `mapping.yaml` it is necessary to set `mapping-target` to `stdout`.
415+
416+
gradle can only globally enable log levels which is very noisy. The best option to log the mapping lookups is simply write them to stdout.
417+
381418
== compatibility:
382419

383420
This section contains keys to disable breaking changes.

0 commit comments

Comments
 (0)