5

I'm trying out the micronaut-framework (1.0.1) and wondering whether there is a possibility to configure some logger for a cerntain environment like I did it in spring boot: I.e for the environment (profile) prod I wannt this logger configuration. application-prod.yaml:

logging:
  level:
    root: warn
    xyz.x: info
    xyz.x.processorcli.ProcessorCliApplication: warn
Roman T
  • 1,400
  • 5
  • 18
  • 31

1 Answers1

5

Found a workaround. In Micronaut you can override location of your logback.xml by setting the system property logback.configurationFile. I.e. java -Dlogback.configurationFile=logback-prod.xml -jar your.jar

Roman T
  • 1,400
  • 5
  • 18
  • 31
  • 1
    A correction, it is a [logback](http://logback.qos.ch/manual/configuration.html#configFileProperty) property not micronaut's – deFreitas Mar 22 '20 at 19:32