0
votes

I'm setting up some selenium tests written in C# to run in teamcity. The tests output various info when running, I have a log4net rolling file appender on the project and when they run locally in VS or using the nunit test runner they write to a log file correctly. When running in teamcity this doesn't happen. Is it possible to get this working?

TeamCity version: 9.0.3 TeamCity Nunit runner: 2.6.4

1

1 Answers

1
votes

Yes, TeamCity's build log is actually the console output, so you need to use log4net's ConsoleAppender.

Have a look at an example here on how to configure it. https://logging.apache.org/log4net/release/config-examples.html

Also log4net allows multiple appenders to be used, so you can keep the rolling file appender as well if needed.