Build log is showing extra messages
Completed
Our TeamCity build log is showing more messages than if the same command is run from the command prompt.
Two examples:
Compile build step
Command line build step which runs 'dotnet build'. When run in TeamCity compared to the command line, there are extra messages relating to compiler warnings.
Test build step
Command line build step which runs 'dotnet test'. When run in TeamCity compared to the command line, there are extra messages originating in EF core, relating operations/queries on the DB context used by the tests.
I am struggling to figure out how to turn off these extra messages.
Focusing on the Test build step, I have tried:
- as above, not passing any logger parameter to dotnet test. Even if I do set a logger and level, the same messages appear in the command line and in TeamCity, but there are always extra messages in Teamcity. ie: this setting does not affect the extra messages
- clearing existing default logging providers in our custom implementation of the ASP.NET WebApplicationFactory used in our tests
- removing all additional logging attached to ILoggerFactory in Startup (ven though it is not called in tests)
Any ideas on why TeamCity is showing the extra messages?
Thanks
Please sign in to leave a comment.
In order to better understand what you're seeing, would it be possible to share the output you're experiencing for each of these command lines? Additionally, what is all in your command line script, is this something you could share with a screenshot? Finally, in what OS are you running your command line script?
Hi, sorry for the delay.
Sample of extra messages:
and many many more...
In our tests we use EF Core with an in memory database. We setup and and populate multiple databases, and every EF command is logged to the Build Log. As mentioned above, the EF core messages are the primary issue due to their volume, but we also see extra messages for compiler warnings.
Command line script in build step:
Note I tried it with only 'dotnet test' but reverted it to the above so that we get 'Test passed' counts in the main page listing all the builds ie:
This did not have any effect on the extra log messages, as mentioned in first bullet point of the original post.
OS Teamcity is running on:
Windows Server 2016
Thanks
I've since determined that this is not specific to TeamCity - when I run the tests in Visual Studio all of the SQL commands appear in the output window. I will try and address the root cause of the issue instead of supressing them in TC.