Commandline/object-model to inspect a binlog for errors/warnings
See original GitHub issueA typical way in with file logs are used esp. in local/dev-builds goes like this:
$warn = Get-Content msbuild.wrn
$err = Get-Content msbuild.err
if (warn.length -gt 0) {
Write-Error "Warnings Found"
}
if (err.length -gt 0) {
Write-Error "Errors Found"
}
I’m wondering if there is a simple way to replace file-logs with binary-logs for this type of scenario. Specifically, if there is a simple approach (for e.g., using powershell) to inspect a binary log for these (without replaying the log using msbuild - that would defeat the purpose of replacing file-logs with binary-logs):
- Number of errors (or whether errors exist)
- The error text
- Number of warnings (or whether warnings exist)
- The warning text
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
4.6.9 mysqlbinlog — Utility for Processing Binary Log Files
The server's binary log consists of files containing “events” that describe modifications to database contents. The server writes these files in binary ...
Read more >Using MySQL BinLogs: A Detailed Guide
This blog explains using MySQL BinLogs & its operations in a simple way. It is a comprehensive guide on how to implement various...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @stephentoub @danmosemsft Vatsan has found an interesting scenario where reading a binlog takes 4 seconds on .NET Desktop, but 40 seconds on Core 3.1.
Repro:
git clone https://github.com/vatsan-madhavan/MSBuildStructuredLogSummary
msbuild /r
MSBuildBinLogSummary\bin\Debug\net472\MSBuildBinLogSummary.exe --log-file C:\temp\Vatsan\vatsan.binlog
- takes 4 secondsMSBuildBinLogSummary\bin\Debug\netcoreapp3.1\MSBuildBinLogSummary.exe --log-file C:\temp\Vatsan\vatsan.binlog
- takes 40 secondsThe stack that I saw was taking all the time is ReadByte from a GzipStream, it’s called millions of times (to read the binlog):
Is this something known? On Desktop Framework I see a similar native inflate stack, but it doesn’t cost nearly as much. Would someone be able to take a look? Thanks!
Yes, try
build.FindChildrenRecursive<Error>
andbuild.FindChildrenRecursive<Warning>