mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: IcdErrorLog traces to Visual Studio output
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
#else
|
||||||
|
using System.Diagnostics;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils
|
namespace ICD.Common.Utils
|
||||||
@@ -38,12 +40,49 @@ namespace ICD.Common.Utils
|
|||||||
{EXCEPTION, ErrorLog.Exception},
|
{EXCEPTION, ErrorLog.Exception},
|
||||||
{INFO, (m, e) => ErrorLog.Info(m)}
|
{INFO, (m, e) => ErrorLog.Info(m)}
|
||||||
#else
|
#else
|
||||||
{ERROR, (m, e) => Console.Error.WriteLine(m)},
|
{
|
||||||
{WARN, (m, e) => Console.Error.WriteLine(m)},
|
ERROR, (m, e) =>
|
||||||
{NOTICE, (m, e) => Console.Error.WriteLine(m)},
|
{
|
||||||
{OK, (m, e) => Console.Error.WriteLine(m)},
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
{EXCEPTION, (m, e) => Console.Error.WriteLine(m)},
|
Console.Error.WriteLine(m);
|
||||||
{INFO, (m, e) => Console.Error.WriteLine(m)}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
WARN, (m, e) =>
|
||||||
|
{
|
||||||
|
|
||||||
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
|
Console.Error.WriteLine(m);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
NOTICE, (m, e) =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
|
Console.Error.WriteLine(m);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
OK, (m, e) =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
|
Console.Error.WriteLine(m);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
EXCEPTION, (m, e) =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
|
Console.Error.WriteLine(m);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
INFO, (m, e) =>
|
||||||
|
{
|
||||||
|
Trace.WriteLine(AnsiUtils.StripAnsi(m));
|
||||||
|
Console.Error.WriteLine(m);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user