mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Change log facility.
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using NLog;
|
||||
|
||||
namespace Wox.Infrastructure.Logger
|
||||
{
|
||||
public class Log
|
||||
{
|
||||
private static ILog fileLogger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static NLog.Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public static void Error(string msg)
|
||||
{
|
||||
fileLogger.Error(msg);
|
||||
logger.Error(msg);
|
||||
}
|
||||
|
||||
public static void Error(Exception e)
|
||||
{
|
||||
fileLogger.Error(e.Message + "\r\n" + e.StackTrace);
|
||||
logger.Error(e.Message + "\r\n" + e.StackTrace);
|
||||
}
|
||||
|
||||
public static void Debug(string msg)
|
||||
{
|
||||
fileLogger.Debug(msg);
|
||||
logger.Debug(msg);
|
||||
}
|
||||
|
||||
public static void Info(string msg)
|
||||
{
|
||||
fileLogger.Info(msg);
|
||||
logger.Info(msg);
|
||||
}
|
||||
|
||||
public static void Warn(string msg)
|
||||
{
|
||||
fileLogger.Warn(msg);
|
||||
logger.Warn(msg);
|
||||
}
|
||||
|
||||
public static void Fatal(string msg)
|
||||
{
|
||||
fileLogger.Fatal(msg);
|
||||
logger.Fatal(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2694
Wox.Infrastructure/Logger/NLog.xsd
Normal file
2694
Wox.Infrastructure/Logger/NLog.xsd
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user