Example #1
0
            public void Log(NuGet.Common.ILogMessage message)
            {
                switch (message.Level)
                {
                case LogLevel.Warning:
                    LogWarning(message.Message);
                    break;

                case LogLevel.Error:
                    LogError(message.Message);
                    break;
                }
            }
Example #2
0
            public Task LogAsync(NuGet.Common.ILogMessage message)
            {
                switch (message.Level)
                {
                case LogLevel.Warning:
                    LogWarning(message.Message);
                    break;

                case LogLevel.Error:
                    LogError(message.Message);
                    break;
                }

                return(Task.CompletedTask);
            }
 public Task LogAsync(NuGet.Common.ILogMessage message)
 {
     Log(message);
     return(System.Threading.Tasks.Task.CompletedTask);
 }
 public void Log(NuGet.Common.ILogMessage message)
 {
     lock (_lock) _ctx.Information($"NuGet ({message.Level}) - Code: {message.Code} - Project: {message.ProjectPath} - {message.Message}");
 }
Example #5
0
 /// <summary>
 /// Generic Logging of ILogMessage Async
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public Task LogAsync(NuGetCommon.ILogMessage message)
 {
     return(Task.Run(() => Log(message)));
 }
Example #6
0
 /// <summary>
 /// Generic Logging of ILogMessage
 /// </summary>
 /// <param name="message"></param>
 public void Log(NuGetCommon.ILogMessage message)
 {
     Log(message.Level, message.Message);
 }