Files
Orchard/src/Orchard.Web/Modules/Orchard.Packaging/Services/NugetLogger.cs
Sebastien Ros d3e6be246e Adding nuget's log to the command's output
--HG--
branch : nuget
2010-11-09 16:37:38 -08:00

27 lines
866 B
C#

using System;
using NuGet;
using Orchard.Localization;
using Orchard.UI.Notify;
namespace Orchard.Packaging.Services {
public class NugetLogger : ILogger {
private readonly INotifier _notifier;
public NugetLogger(INotifier notifier) {
_notifier = notifier;
}
public void Log(MessageLevel level, string message, params object[] args) {
switch ( level ) {
case MessageLevel.Debug:
break;
case MessageLevel.Info:
_notifier.Information(new LocalizedString(String.Format(message, args)));
break;
case MessageLevel.Warning:
_notifier.Warning(new LocalizedString(String.Format(message, args)));
break;
}
}
}
}