2021-07-19 08:32:57 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
2021-11-30 19:27:51 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.WindowsSettings
|
2021-07-19 08:32:57 +00:00
|
|
|
|
{
|
|
|
|
|
|
public static class Log
|
|
|
|
|
|
{
|
2021-07-19 09:17:09 +00:00
|
|
|
|
private static IPublicAPI? _api;
|
2021-07-19 08:32:57 +00:00
|
|
|
|
|
|
|
|
|
|
public static void Init(IPublicAPI api)
|
|
|
|
|
|
{
|
|
|
|
|
|
_api = api;
|
|
|
|
|
|
}
|
2025-04-13 09:59:39 +00:00
|
|
|
|
|
2021-07-19 08:32:57 +00:00
|
|
|
|
public static void Exception(string message, Exception exception, Type type, [CallerMemberName] string methodName = "")
|
|
|
|
|
|
{
|
2021-07-19 09:17:09 +00:00
|
|
|
|
_api?.LogException(type.FullName, message, exception, methodName);
|
2021-07-19 08:32:57 +00:00
|
|
|
|
}
|
2025-04-13 09:59:39 +00:00
|
|
|
|
|
2021-07-19 08:32:57 +00:00
|
|
|
|
public static void Warn(string message, Type type, [CallerMemberName] string methodName = "")
|
|
|
|
|
|
{
|
2021-07-19 09:17:09 +00:00
|
|
|
|
_api?.LogWarn(type.FullName, message, methodName);
|
2021-07-19 08:32:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|