LogTracker.Log Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Log(Diagnostic) |
Increases the error or warning counter if appropriate, and prints the given diagnostic ff the logger verbosity is sufficiently high. Before printing, the line numbers are shifted by the offset specified upon initialization. Returns without doing anything if the given diagnostic is a warning that is to be ignored. |
| Log(Diagnostic[]) |
Logs the given diagnostic messages. Ignores any parameter that is null. |
| Log(Exception) |
Increases the exception counter and calls OnException with the given exception. |
| Log(ErrorCode, IEnumerable<String>, String, Range) |
Logs a diagnostic message based on the given error code, with the given source as the file for which the error occurred. |
| Log(WarningCode, IEnumerable<String>, String, Range) |
Logs a a diagnostic message based on the given warning code, with the given source as the file for which the error occurred. |
| Log(InformationCode, IEnumerable<String>, String, Range, String[]) |
Generates a Diagnostic message based on the given information code, with any message parameters appended on a new line to the message defined by the information code. The given source is listed as the file for which the error occurred. |
Log(Diagnostic)
Increases the error or warning counter if appropriate, and prints the given diagnostic ff the logger verbosity is sufficiently high. Before printing, the line numbers are shifted by the offset specified upon initialization. Returns without doing anything if the given diagnostic is a warning that is to be ignored.
public void Log (Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic m);
member this.Log : Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic -> unit
Public Sub Log (m As Diagnostic)
Parameters
Applies to
Log(Diagnostic[])
Logs the given diagnostic messages. Ignores any parameter that is null.
public void Log (params Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic[] messages);
abstract member Log : Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic[] -> unit
override this.Log : Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic[] -> unit
Public Sub Log (ParamArray messages As Diagnostic())
Parameters
- messages
- Diagnostic[]
Implements
Applies to
Log(Exception)
Increases the exception counter and calls OnException with the given exception.
public void Log (Exception ex);
abstract member Log : Exception -> unit
override this.Log : Exception -> unit
Public Sub Log (ex As Exception)
Parameters
- ex
- Exception
Implements
Applies to
Log(ErrorCode, IEnumerable<String>, String, Range)
Logs a diagnostic message based on the given error code, with the given source as the file for which the error occurred.
public void Log (Microsoft.Quantum.QsCompiler.Diagnostics.ErrorCode code, System.Collections.Generic.IEnumerable<string> args, string? source = default, Microsoft.VisualStudio.LanguageServer.Protocol.Range? range = default);
abstract member Log : Microsoft.Quantum.QsCompiler.Diagnostics.ErrorCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range -> unit
override this.Log : Microsoft.Quantum.QsCompiler.Diagnostics.ErrorCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range -> unit
Public Sub Log (code As ErrorCode, args As IEnumerable(Of String), Optional source As String = Nothing, Optional range As Range = Nothing)
Parameters
- code
- ErrorCode
- args
- IEnumerable<String>
- source
- String
- range
- Range
Implements
Applies to
Log(WarningCode, IEnumerable<String>, String, Range)
Logs a a diagnostic message based on the given warning code, with the given source as the file for which the error occurred.
public void Log (Microsoft.Quantum.QsCompiler.Diagnostics.WarningCode code, System.Collections.Generic.IEnumerable<string> args, string? source = default, Microsoft.VisualStudio.LanguageServer.Protocol.Range? range = default);
abstract member Log : Microsoft.Quantum.QsCompiler.Diagnostics.WarningCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range -> unit
override this.Log : Microsoft.Quantum.QsCompiler.Diagnostics.WarningCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range -> unit
Public Sub Log (code As WarningCode, args As IEnumerable(Of String), Optional source As String = Nothing, Optional range As Range = Nothing)
Parameters
- code
- WarningCode
- args
- IEnumerable<String>
- source
- String
- range
- Range
Implements
Applies to
Log(InformationCode, IEnumerable<String>, String, Range, String[])
Generates a Diagnostic message based on the given information code, with any message parameters appended on a new line to the message defined by the information code. The given source is listed as the file for which the error occurred.
public void Log (Microsoft.Quantum.QsCompiler.Diagnostics.InformationCode code, System.Collections.Generic.IEnumerable<string> args, string? source = default, Microsoft.VisualStudio.LanguageServer.Protocol.Range? range = default, params string[] messageParam);
abstract member Log : Microsoft.Quantum.QsCompiler.Diagnostics.InformationCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range * string[] -> unit
override this.Log : Microsoft.Quantum.QsCompiler.Diagnostics.InformationCode * seq<string> * string * Microsoft.VisualStudio.LanguageServer.Protocol.Range * string[] -> unit
Public Sub Log (code As InformationCode, args As IEnumerable(Of String), Optional source As String = Nothing, Optional range As Range = Nothing, ParamArray messageParam As String())
Parameters
- code
- InformationCode
- args
- IEnumerable<String>
- source
- String
- range
- Range
- messageParam
- String[]