Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/configuration/examples/token.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Example Token Config (all configurations shown)

name: abc

service:
logLevel: debug
port: 1234

api:
tokens: [LOOOONG_STRING]

settings:
message:
fieldMappings: # Disable mappings
variables: # Disable variable placeholders
variables: # Override variables
number: "+123400004"

access:
endpoints: # Disable sending
Expand Down
23 changes: 22 additions & 1 deletion docs/configuration/log-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Log Levels

Log levels help to filter or explicitly allow certain information from the logs.

To change the log level set `logLevel` to: (default: `info`)
To change the log level set `service.logLevel` to one of the following levels… (default: `info`)

**Levels:**

Expand All @@ -19,3 +19,24 @@ To change the log level set `logLevel` to: (default: `info`)
> [!CAUTION]
> The log level `dev` **can leak data in the logs**
> and must only be used for testing during development

## Per-Token Logger

Each token config can define its **own log level**, independent of the global logger.

This allows fine-grained control, for example:

- verbose logging for one integration
- minimal logging for another

If `service.logLevel` is not set, the global log level is used.

### Logger Naming

Each token logger is automatically named using the [`name` attribute](./name) to make log output easier to identify.

**Example output:**

```log
11.11 11:11 INFO middlewares/log.go:60 abc GET /v2/send
```
13 changes: 13 additions & 0 deletions docs/configuration/name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Name
---

# Name

Each token config can be explicitly named by setting the `name` field.

```yaml
name: abc
```

If `name` is not set, the name is automatically derived from the configuration filename (without extension).