diff --git a/docs/configuration/examples/token.yml b/docs/configuration/examples/token.yml index 7997fe05..d71341ad 100644 --- a/docs/configuration/examples/token.yml +++ b/docs/configuration/examples/token.yml @@ -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 diff --git a/docs/configuration/log-level.md b/docs/configuration/log-level.md index 46bd85ef..efd95c14 100644 --- a/docs/configuration/log-level.md +++ b/docs/configuration/log-level.md @@ -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:** @@ -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 +``` diff --git a/docs/configuration/name.md b/docs/configuration/name.md new file mode 100644 index 00000000..ea228d7d --- /dev/null +++ b/docs/configuration/name.md @@ -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).