# Discovery log files

This page describes the log files generated by the Discovery server.

## Overview

Discovery server is built on the Spring Boot framework and uses the [Logback](https://logback.qos.ch/manual/index.html) logging library by default.

For detailed information on logging in Spring Boot applications, see [Spring Boot Logging](https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-logging.html).

## Logging configuration

By default, Discovery is configured to log to `logs/discovery.log`. The log file is rolled at 10MB and a maximum of 7 rolled files are retained.

### Changing the default configuration

Discovery’s logging is configured in the Spring Boot `config/application.properties` file.

**Default values**

| Configuration | Description | Default value |
| --- | --- | --- |
| [logging.file](discovery-server-configuration.md#logging-file) | Path to log file | logs/discovery.log |
| [logging.file.max-history](xref:discovery-server-configuration.md#logging-file-max-size) | Maximum number of rolled files to retain | 7 |
| [logging.file.max-size](discovery-server-configuration.md#logging-file-max-size) | Log file rolling trigger | 10MB |
| [logging.level.root](discovery-server-configuration.md#logging-level) | Logging level of root logger | INFO |

### Overriding logging configuration on the command line

The `discovery.sh` control script accepts Spring Boot configuration options on the command line, which override settings in `config/application.properties`:

```console
$ ./discovery.sh start --logging.file.max-size=5MB
```

## Logging in container-based deployments

In container-based deployments it is common practice to run applications in the foreground and log to STDOUT, delegating log file management to the container orchestrator.

The `discovery.sh` control script’s `start` command has a `-f` option that runs Discovery as a foreground process and logs to STDOUT:

```console
$ discovery.sh start -f
```
