refactor LogManagerExtension

This commit is contained in:
xjasonlyu
2022-05-27 22:53:42 +08:00
parent 24a6440518
commit bb0deca91c

View File

@@ -6,14 +6,9 @@ namespace Jellyfin.Plugin.JavTube.Extensions;
internal static class LogManagerExtension
{
public static ILogger CreateLogger<T>(this ILogManager factory)
public static ILogger CreateLogger<T>(this ILogManager instance)
{
return factory.GetLogger(Format(typeof(T)));
}
private static string Format(MemberInfo type)
{
return $"{Constant.JavTube}.{type.Name}";
return instance.GetLogger($"{Constant.JavTube}.{typeof(T).Name}");
}
}