1

We have a requirement to take the logs level value while executing the Azure pipelines. I am providing value via maven command line in Azure Pipelines like below;

mvn clean test -Dkarate.logLevel=${{ parameters.karateLogLevel }}

This is how i am passing in logback-test.xml file. No matter if we provide ERROR and it always display DEBUG level logs. I think the default level is DEBUG. <logger name="com.intuit" level="${logLevel}"/>

ANSWER

By passing variable in -DlogLevel it passed the value in "logback-test.xml"

mvn clean test -DlogLevel=${{ parameters.karateLogLevel }}

Maddy
  • 674
  • 1
  • 7
  • 26

1 Answers1

1

Please consider what you are asking as not supported by Karate. You are welcome to contribute code to improve things. Or maybe you should do some research into logback and ask another specific question that has nothing to do with Karate.

Also read this: https://stackoverflow.com/a/69025455/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248