
# All properties

Every property `spring_boot_starter_logging` reads, grouped by prefix, with the level keys that `spring_boot_dart` applies. The starter binds them through `LoggingProperties`, `AnsiProperties` and `ApplicationGroupProperties`, which also produce its editor metadata.

## Why

Logging is configured entirely with properties: there is no `logback.xml`. This page lists every key, so you can check a name, its default and its unit in one place.

## Example

A server that logs to a file and keeps the console short:

```yaml
# lib/resources/application.yml
spring:
  application:
    name: shop
    group: neon
  output:
    ansi:
      enabled: detect
logging:
  level:
    root: info
    neon.checkout: debug
  group:
    payments: [neon.card, neon.cash]
  pattern:
    console: "%d{HH:mm:ss.SSS} %clr(%5p) [%logger{20}] %m%X%n"
    dateformat: "yyyy-MM-dd HH:mm:ss.SSS"
  threshold:
    console: info
    file: debug
  file:
    name: logs/shop.log
    rolling-policy:
      max-file-size: 10MB
      max-history: 7
      total-size-cap: 100MB
  buffer:
    capacity: 2000
```

```properties
# lib/resources/application.properties: the same
spring.application.name=shop
spring.application.group=neon
spring.output.ansi.enabled=detect
logging.level.root=info
logging.level.neon.checkout=debug
logging.group.payments=neon.card,neon.cash
logging.pattern.console=%d{HH:mm:ss.SSS} %clr(%5p) [%logger{20}] %m%X%n
logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS
logging.threshold.console=info
logging.threshold.file=debug
logging.file.name=logs/shop.log
logging.file.rolling-policy.max-file-size=10MB
logging.file.rolling-policy.max-history=7
logging.file.rolling-policy.total-size-cap=100MB
logging.buffer.capacity=2000
```

## Writing values

- **Levels:** `trace`, `debug`, `info`, `warn` (or `warning`), `error` (or `fatal`), `off`, in any case. `false` (YAML's unquoted `off`) is `off`.
- **Booleans:** `true` / `false`, also `on` / `off`, `yes` / `no`, `1` / `0`; others stop the start. For `logging.enabled`, only `false` turns the starter off: as with `@ConditionalOnProperty`, `off`, `no` or `0` leave it on.
- **Data sizes:** `10MB`, `512KB`; a plain number is bytes.
- **Patterns** are bound as written: their `${...}` is resolved by the pattern.
- A value the starter cannot read (a pattern, a level, a number, a size, a charset) stops the start rather than logging badly.

## The starter

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.enabled` | `bool` | `true` | `false`: the starter sets up nothing (no outputs, no buffer, no beans); `SpringLog` keeps its plain output |

## Levels (applied by spring_boot_dart)

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.level.root` (or `logging.level`) | level | `info` | The level of every logger without one of its own or of an ancestor |
| `logging.level.<logger>` | level | inherited | The level of a logger and the loggers below it; `LOGGING_LEVEL_NEON_CHECKOUT=debug` as a variable |
| `logging.group.<group>` | `List<String>` | `web` and `sql` predefined | Logger names; `logging.level.<group>` sets them all |

See [Logging levels](../spring-boot-dart/logging-levels.md).

## `logging.pattern.*`: the line formats

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.pattern.console` | pattern | Spring Boot's console pattern | The console line; an empty value turns the console off → [Patterns](patterns.md) |
| `logging.pattern.file` | pattern | Spring Boot's file pattern | The file line; an empty value means no file → [Patterns](patterns.md) |
| `logging.pattern.dateformat` | date pattern | `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` | The `%d` of the default patterns (times are UTC); `${LOG_DATEFORMAT_PATTERN}` |
| `logging.pattern.level` | pattern | `%5p` | The level column of the default patterns; `${LOG_LEVEL_PATTERN}` |
| `logging.pattern.correlation` | pattern | empty | After `[thread]` in the default patterns; `${LOG_CORRELATION_PATTERN}` |
| `logging.exception-conversion-word` | pattern | `%wEx` | How the default patterns print an error; `${LOG_EXCEPTION_CONVERSION_WORD}` |
| `logging.include-application-name` | `bool` | `true` | Puts `[spring.application.name]` into the default patterns |
| `logging.include-application-group` | `bool` | `true` | Puts `[spring.application.group]` into the default patterns |
| `spring.application.group` | `String` | none | The application's group, shown in the default patterns |

## The console

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.console.enabled` | `bool` | `true` | The console output → [The console](console.md) |
| `logging.console.target` | `stdout` / `stderr` / `system-out` / `system-err` | not set: standard output, or what the application set (`debugPrint`) | Where the console writes on the Dart VM |
| `logging.threshold.console` | level | `trace` | The lowest level the console shows |
| `logging.charset.console` | charset | none | Only checked: the console writes text, not bytes |
| `spring.output.ansi.enabled` | `always` / `detect` / `never` | `always`; `never` where the console shows codes as text (Flutter on iOS) | Colours: `%clr`, or Spring Boot's colours for a pattern without any → [The console](console.md#colours) |

## The buffer

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.buffer.enabled` | `bool` | `true` | Whether the `logBuffer` receives records → [Log screen](log-buffer.md) |
| `logging.buffer.capacity` | `int`, 1 to 1,000,000 | `1000` | How many records it keeps |
| `logging.threshold.buffer` | level | `trace` | The lowest level it keeps |

## `logging.file.*`: the log file

| Key | Type | Default | Meaning |
|---|---|---|---|
| `logging.file.name` | path | none | The log file; relative to `LoggingSystem.fileDirectory`, else the working directory → [Log files](log-files.md) |
| `logging.file.path` | directory | none | `<dir>/spring.log` when no name is set |
| `logging.threshold.file` | level | `trace` | The lowest level the file keeps |
| `logging.charset.file` | charset | UTF-8 | UTF-8, ISO-8859-1, US-ASCII; unencodable characters become `?` |
| `logging.file.rolling-policy.max-file-size` | `DataSize` | `10MB` | The size at which the file rolls over to `.1`, `.2`, ... |
| `logging.file.rolling-policy.max-history` | `int` | `7` | How many rolled files are kept; `0`: all |
| `logging.file.rolling-policy.total-size-cap` | `DataSize` | `0B`: no limit | The largest total size of the rolled files |
| `logging.file.rolling-policy.clean-history-on-start` | `bool` | `false` | Deletes the rolled files when the application starts |

## Renamed, ignored and unsupported keys

| Key | What happens |
|---|---|
| `logging.logback.rollingpolicy.*` | Stops the start and names `logging.file.rolling-policy.*` |
| `logging.file.max-size`, `logging.file.max-history`, `logging.file.total-size-cap`, `logging.file.clean-history-on-start` | Ignored with a warning naming the current key |
| `logging.file.rolling-policy.file-name-pattern` | Ignored with a warning |
| `logging.config`, `logging.structured.*`, `logging.logback.*` other keys | Not read |

## See also

- [The console](console.md)
- [Patterns](patterns.md)
- [Log files](log-files.md)
- [All properties of spring_boot_dart](../spring-boot-dart/properties.md)
