Skip to content

[pull] main from MicrosoftDocs:main #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review feedback
  • Loading branch information
TylerMSFT committed Jun 6, 2025
commit 620bca6147d35c4b3b305ce6f4ce540886642a51
12 changes: 9 additions & 3 deletions docs/build/reference/experimental-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ Output [SARIF](https://sarifweb.azurewebsites.net/) diagnostics to the specified
## Syntax

> **`/experimental:log`** *filename*
> **`/experimental:log`** *directoryname\*
> **`/experimental:log`** *directoryname`\`*

## Arguments

*filename*

The output file for SARIF diagnostics. The compiler automatically adds the `.sarif` extension to *filename*. The space between `/experimental:log` and *filename* is optional. Use double quotes around paths containing spaces. Both relative and absolute paths are supported.

*directoryname\*
*directoryname`\`*

The output directory for SARIF diagnostics (for example, `/experimental:log sarif_output\`). Remember to add the trailing backslash (`\`) to indicate it's a directory. Each source file name forms the base name for each SARIF file saved in the directory. The compiler automatically adds the `.sarif` extension to each file name. The space between `/experimental:log` and *directoryname* is optional. Use double quotes around paths containing spaces. Both relative and absolute paths are supported.
The output directory for SARIF diagnostics (for example, `/experimental:log sarif_output\`). Remember to add the trailing backslash (`\`) to indicate it's a directory. Each source file name forms the base name for each SARIF file saved in the directory. The compiler automatically adds the `.sarif` extension to each file name. The space between `/experimental:log` and *directoryname`\`* is optional. Use double quotes around paths containing spaces. Both relative and absolute paths are supported.

## Remarks

Expand All @@ -39,6 +39,12 @@ Diagnostics are also output as text to the console as usual.

## Example

The following command produces SARIF information for the compilation of `main.cpp` and saves it in the file `main.sarif`:

```cmd
CL /experimental:log main.cpp
```

The following command produces SARIF information for the entire compilation and saves it in the `sarif_output` directory in the files `main.sarif` and `other.sarif`:

```cmd
Expand Down