mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-06 09:35:39 -05:00
@@ -4,7 +4,6 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.Extensibility;
|
||||
using Microsoft.SqlTools.Hosting.Protocol;
|
||||
@@ -70,7 +69,7 @@ namespace Microsoft.SqlTools.Hosting
|
||||
|
||||
protected async Task<THandler> HandleRequestAsync<THandler>(Func<Task<THandler>> handler, RequestContext<THandler> requestContext, string requestType)
|
||||
{
|
||||
Logger.Write(TraceEventType.Verbose, requestType);
|
||||
Logger.Verbose($"Handling request type {requestType}");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -239,6 +239,36 @@ namespace Microsoft.SqlTools.Utility
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Write(TraceEventType eventType, string logMessage) => Write(eventType, LogEvent.Default, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Verbose event level
|
||||
/// </summary>
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Verbose(string logMessage) => Write(TraceEventType.Verbose, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Information event level
|
||||
/// </summary>
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Information(string logMessage) => Write(TraceEventType.Information, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Warning event level
|
||||
/// </summary>
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Warning(string logMessage) => Write(TraceEventType.Warning, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Error event level
|
||||
/// </summary>
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Error(string logMessage) => Write(TraceEventType.Error, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Critical event level
|
||||
/// </summary>
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Critical(string logMessage) => Write(TraceEventType.Critical, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with accompanying callstack.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user