# Logging Configuration
URL: https://docs.valsight.ai/logging-configuration/
Description: NOTE: In application versions that use older version of Grails (Prior to Valsight Version 6) the configuration of logback was done using a logback.groovy fil…
**NOTE:** In application versions that use older version of Grails (Prior to Valsight Version 6) the configuration of logback was done using a logback.groovy file. This is no longer possible and configuration must be done through an XML file named logback-spring xml.

## External configuration file

You can instruct Valsights `Logback` component to use an external configuration file with a system property:

```
$ ./gradlew -Dlogging.config=/Users/me/config/logback-spring.xml bootRun
```

In our distribution folder you can simply add the system property to one of the following files, depends on your environment:

* **Windows**

  * *windowsservice/valsightservice.xml*: simply add the property to the tag <arguments></arguments>
  * *bin/valsight-server.bat*: Add the property to the already declared variable DEFAULT\_JVM\_OPTS
* **Unix**

  * *bin/valsight-server*: Add the property to the already declared variable DEFAULT\_JVM\_OPTS

### Example logback-spring.xml configuration files:

<table class="confluenceTable"><tbody><tr><th><p>Configure Logback given the number of days to keep the logs to archived </p></th><th><p>Configure Logback given the size of the files and the number of logs to archive</p></th></tr><tr><td><p>Download the attached file and configure manually the following parameter to customize the number of days that a log is kept.</p><blockquote><p><code>DAYS_LOG_FILE_ARCHIVED</code> (line 8)</p></blockquote></td><td><p>Download the attached file and configure manually the following parameters to customize the size of the logging file and the number of versions that you want to archive.</p><blockquote><p><code>SIZE_LOG_FILE</code> (line 8)</p><p><code>NUMBER_LOG_FILE_ARCHIVED</code> (line 9)</p></blockquote></td></tr><tr><td><p><span><a data-file-src="/wiki/download/attachments/5094179248/logback_timebase-spring.xml?version=2&amp;modificationDate=1777014716392&amp;cacheVersion=1&amp;api=v2" data-has-thumbnail="true" data-linked-resource-container-id="5094179248" data-linked-resource-default-alias="logback_timebase-spring.xml" data-linked-resource-id="5726076935" data-linked-resource-type="attachment" data-linked-resource-version="2" data-media-id="525fd9fb-de4d-4f82-8e07-205bfc4ec8d3" data-media-type="file" data-mime-type="text/plain" data-nice-type="Text File" href="https://vs-documentation-assets.fsn1.your-objectstorage.com/files/5726076935_logback_timebase-spring.xml">logback_timebase-spring.xml</a></span></p><p></p></td><td><p><span><a data-file-src="/wiki/download/attachments/5094179248/logback_size-spring.xml?version=2&amp;modificationDate=1777014746723&amp;cacheVersion=1&amp;api=v2" data-has-thumbnail="true" data-linked-resource-container-id="5094179248" data-linked-resource-default-alias="logback_size-spring.xml" data-linked-resource-id="5726306305" data-linked-resource-type="attachment" data-linked-resource-version="2" data-media-id="a3f62acc-7853-4d79-9a64-97f491b5df3a" data-media-type="file" data-mime-type="text/plain" data-nice-type="Text File" href="https://vs-documentation-assets.fsn1.your-objectstorage.com/files/5726306305_logback_size-spring.xml">logback_size-spring.xml</a></span></p><p></p></td></tr></tbody></table>

### Useful external links

* [Chapter 3: Configuration](https://logback.qos.ch/manual/configuration.html)
* [Chapter 4: Appenders](https://logback.qos.ch/manual/appenders.html)
* [83. Logging](https://docs.spring.io/spring-boot/docs/2.1.8.RELEASE/reference/html/howto-logging.html)
