Skip to content

Commit

Permalink
Re tkowalcz#107: [Logback] Added documentation about logger name and …
Browse files Browse the repository at this point in the history
…thread name in Loki labels.
  • Loading branch information
tkowalcz committed Mar 24, 2023
1 parent 86eeab2 commit 128f813
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions logback-appender/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@ it into a label.
```
</details>

### Logger name and thread name in labels

You can include logger name and logging thread name as labels by using dedicated configuration tags. It will dynamically extract these values and will turn
them into a label.

```xml
<appender name="Loki" class="pl.tkowalcz.tjahzi.logback.LokiAppender">

...

<loggerNameLabel>
logger_name
</loggerNameLabel>

<threadNameLabel>
thread_name
</threadNameLabel>
</appender>
```

## Details

Let's go through the example config above and analyze configuration options (**Note: Tags are case-insensitive**).
Expand Down

0 comments on commit 128f813

Please sign in to comment.