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.groovy bootRun
YML

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.groovy configuration files:

Configure Logback given the number of days to keep the logs to archived Configure Logback given the size of the files and the number of logs to archive

Download the attached file and configure manually the following parameter to customize the number of days that a log is kept.

daysLogFileArchived (line 20)

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.

  • sizeLogFile (line 20)
  • numberLogFileArchived (line 21)


Useful links:

https://docs.grails.org/latest/guide/conf.html#logging

http://logback.qos.ch/manual/groovy.html

https://logback.qos.ch/manual/appenders.html