feat: logger factory works for static classes by passing the type

This commit is contained in:
Paul Pacheco 2020-04-10 10:51:42 -05:00
parent bc37497ac9
commit f9328c771c

View File

@ -12,6 +12,11 @@ public static ILogger GetLogger<T>()
return GetLogger(typeof(T).Name); return GetLogger(typeof(T).Name);
} }
public static ILogger GetLogger(System.Type type)
{
return GetLogger(type);
}
public static ILogger GetLogger(string loggerName) public static ILogger GetLogger(string loggerName)
{ {
if (loggers.TryGetValue(loggerName, out ILogger logger )) if (loggers.TryGetValue(loggerName, out ILogger logger ))