Skip to content
Advertisement

Failed to generate .log file, but output console is there

I have tried to implement logs in the Serenity Cucumber framework and it prints logs in the console but doesn’t generate a .log file.

This is logback-test.xml under src/test/resources

JavaScript

Added below dependency in pom.xml

JavaScript

Advertisement

Answer

A ConsoleAppender won’t write to a file, and will just ignore the file configuration element under it. Instead, you should use a FileAppender:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement