Skip to main content
Last updated on Aug 25, 2026 The Build Monitor’s File > Export log file command has a command-line equivalent. BuildMonitor.exe accepts a saved .ib_mon monitor file together with the /exportlog= switch and runs the same export as the menu item, so a CI pipeline produces the same JSON a developer gets from the UI. Exporting always takes two steps, because a monitor file is only complete once the build it describes has ended:
  1. The build writes an .ib_mon file (BuildConsole /Mon=).
  2. A separate post-build step converts that file to JSON (BuildMonitor.exe <file> /exportlog=).
If what you need is machine-readable build data for a dashboard rather than this specific file, see Choosing between /exportlog and BuildDataExtractor below.

Prerequisite: Basic logging or higher

The build must run with a logging level of Basic or higher. Minimal logging still produces a monitor file, but that file carries no log data to export, and the export fails with:
Set the level in one of these ways:
  • On the Agent that initiates the build, go to Agent Settings > Agent > General > Logging level and select Basic or higher. See Agent options.
  • Or override it for a single build with the BuildConsole /LogLevel switch, for example /LogLevel="Basic".
/LimitBMData=1, 2, and 3 disable Build Monitor data writing. A build run with any of those values produces a monitor file with nothing useful to export, so leave /LimitBMData unset (or 0) on builds whose log you intend to export.

Step 1: Save an .ib_mon file during the build

Add /Mon= with a full path to your existing BuildConsole (or xgConsole) command:
Keep these in mind when choosing the path:
  • Pass a full filename, not a folder. If the value ends in a backslash, Incredibuild treats it as a folder and generates a GUID for the filename — the next step then has no predictable path to read.
  • The .ib_mon extension is added for you if you leave it off.
  • $(Title) is expanded in the path, so you can produce per-build filenames when the same command also passes /Title=.

Step 2: Export the JSON after the build

Run the export as its own pipeline step, after the build step has finished:
Four details decide whether this works:
  • Run it after the build, as a separate step. The .ib_mon file is not finalized until the build ends, so the export cannot be folded into the build command.
  • Run it even when the build fails — a failed build is usually the one whose log you want. Use if: always() in GitHub Actions, condition: always() in Azure DevOps, and wrap the build in try/finally in Jenkins.
  • start /wait "" is required. BuildMonitor.exe is a GUI application, so invoking it directly returns immediately and the next pipeline step runs against a JSON file that has not been written yet. The empty "" is the window title that start expects — without it, start treats the quoted path to the executable as the title and never launches it.
  • Put the .ib_mon path first, unprefixed, and use = for the switch. Written with a space instead of an equals sign, /exportlog C:\out.json is silently ignored.

Step 3: Publish the output files

The command writes two files: Collect both if you want the full picture. The .zip is optional if you only need the log itself.

Step 4: Verify that the export worked

BuildMonitor.exe does not return a meaningful exit code for this operation. Do not gate the pipeline on %ERRORLEVEL% here — it looks like success either way. Assert on the output file instead:
When the JSON is missing, the cause is almost always the prerequisite above: logging was below Basic during the build, and the console output says Build log is not available for this type of monitor file.

Full example: GitHub Actions

This workflow builds, exports the log regardless of the build’s outcome, and uploads both output files. For the rest of the GitHub Actions setup, see Integrating with Github Actions.

Choosing between /exportlog and BuildDataExtractor

BuildDataExtractor64.exe also reads an .ib_mon file and also writes JSON, but it is a different tool that emits a different document. It is not a substitute when you need to match what the UI exports. BuildDataExtractor64.exe is a real console application with meaningful exit codes, which makes it the easier tool to script around. Choose it when you are building your own reporting on top of build data. Choose /exportlog when the requirement is specifically the log file the Build Monitor produces.