diff --git a/src/FSharp.Analyzers.Cli/Program.fs b/src/FSharp.Analyzers.Cli/Program.fs index 38e6705..3af739d 100644 --- a/src/FSharp.Analyzers.Cli/Program.fs +++ b/src/FSharp.Analyzers.Cli/Program.fs @@ -358,7 +358,7 @@ let writeReport (results: AnalyzerMessage list option) (codeRoot: string option) sarifLogger.Dispose() with ex -> - logger.LogError("Could not write sarif to {report}") + logger.LogError(ex, "Could not write sarif to {report}", report) logger.LogInformation("{0}", ex) let calculateExitCode (msgs: AnalyzerMessage list option) : int = @@ -576,7 +576,7 @@ let main argv = | projects, None -> for projPath in projects do if not (File.Exists(projPath)) then - logger.LogError("Invalid `--project` argument. File does not exist: '{projPath}'") + logger.LogError("Invalid `--project` argument. File does not exist: '{projPath}'", projPath) exit 1 projects