public static void Initialize() { if (_loggerFactory != null) { _loggerFactory.Initialize(); } }
public void BuildUp(IBuilderContext context) { if (context.Existing == null) { ILog log = LogFactory.Initialize(LogType); context.Existing = log; } }
public static ILog Create(Type declaringType) { if (declaringType == null) { throw new ArgumentNullException("The argument cannot be null", "declaringType"); } if (factory == null) { try { factory = Factory.Get <ILogFactory>(); factory.Initialize(); } catch { } } return(factory == null ? new WrapLog(declaringType) : factory.Create(declaringType)); }
public static ILog Create(string loggerName) { if (string.IsNullOrWhiteSpace(loggerName)) { throw new ArgumentNullException($"The argument cannot be null", nameof(loggerName)); } if (factory == null) { try { factory = Factory.Get <ILogFactory>(); factory.Initialize(); } catch { } } return(factory == null ? new WrapLog(loggerName) : factory.Create(loggerName)); }