Skip to content

Commit ab4c3db

Browse files
committed
update example
1 parent b222aee commit ab4c3db

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/build/reference/experimental-log.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ Output [SARIF](https://sarifweb.azurewebsites.net/) diagnostics to the specified
1212
## Syntax
1313

1414
> **`/experimental:log`** *filename*
15+
> **`/experimental:log`** *directoryname\*
1516
1617
## Arguments
1718

1819
*filename*
1920

20-
Where to output SARIF diagnostics. The `.sarif` suffix is added to *filename* to produce the final filename at which to store the resulting SARIF diagnostics. The space between `/experimental:log` and *filename* is optional. Paths that include spaces must be enclosed in double quotes. *filename* may name a relative or absolute path.
21+
Specifies the output path 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.
22+
23+
Specify a directory name (for example, `/experimental:log sarif_output\`) to output SARIF files for each source file to that directory, using the source file name as the base name for each SARIF file.
2124

2225
## Remarks
2326

@@ -28,19 +31,16 @@ Diagnostics are also output as text to the console as usual.
2831
### To set this compiler option in the Visual Studio development environment
2932

3033
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
31-
3234
1. Select the specific project **Configuration** and **Platform** for which you want to change the property. You can also choose **"All Configurations"** and **"All Platforms"**.
33-
3435
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
35-
3636
1. Modify the **Additional Options** property, and then choose **OK**.
3737

3838
## Example
3939

40-
The following command produces SARIF information for the entire compilation in the `diags.sarif` file in the current directory:
40+
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`:
4141

4242
```cmd
43-
CL /experimental:logdiags main.cpp other.cpp
43+
CL /experimental:log sarif_output\ main.cpp other.cpp
4444
```
4545

4646
## See also

0 commit comments

Comments
 (0)