MSBuild 15.3 introduces a new command-line switch: /bl to record all build events to a structured/binary log file:
/bl
Double-click the .binlog file to open it in MSBuild Structured Log Viewer:
.binlog