Exemplo n.º 1
0
        public static void ConfigureLogging(Action <ILogHelperLoggingBuilder> configureAction)
        {
            var loggingBuilder = new LogHelperLoggingBuilder();

            Guard.NotNull(configureAction, nameof(configureAction)).Invoke(loggingBuilder);
            LogFactory = loggingBuilder.Build();
        }
Exemplo n.º 2
0
        public static void ConfigureLogging(Action <ILogHelperLoggingBuilder> configureAction)
        {
            var loggingBuilder = new LogHelperLoggingBuilder();

            configureAction?.Invoke(loggingBuilder);
            LogFactory = loggingBuilder.Build();
        }
Exemplo n.º 3
0
 public StockPriceViewModel()
 {
     _log        = NinjectWebCommon.GetConcreteInstance <ILogHelperFactory>();
     _unitOfWork = NinjectWebCommon.GetConcreteInstance <IStockAppUnitOfWork>();
 }
 public static ILogHelperLogger GetLogger(this ILogHelperFactory logHelperFactory, Type type)
 {
     return(logHelperFactory.CreateLogger(type.FullName));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Set the  log factory to use
 /// </summary>
 /// <param name="logFactory">Log factory to use</param>
 public static void SetCurrent(ILogHelperFactory logFactory)
 {
     _currentLogFactory = logFactory;
 }
Exemplo n.º 6
0
 public StockSymbolViewModel(ILogHelperFactory log, IStockAppUnitOfWork unitOfWork)
 {
     _log = log;
     _unitOfWork = unitOfWork;
 }
 public static ILogHelperFactory WithProvider(this ILogHelperFactory logHelperFactory, ILogHelperProvider logHelperProvider)
 {
     logHelperFactory.AddProvider(logHelperProvider);
     return(logHelperFactory);
 }
 public static ILogHelperFactory WithFilter(this ILogHelperFactory logHelperFactory, Func <Type, string, LogHelperLevel, bool> filterFunc)
 {
     logHelperFactory.AddFilter((type, categoryName, logLevel, exception) => filterFunc.Invoke(type, categoryName, logLevel));
     return(logHelperFactory);
 }
Exemplo n.º 9
0
 public APIInfoViewModel()
 {
     _log = NinjectWebCommon.GetConcreteInstance <ILogHelperFactory>();
 }
Exemplo n.º 10
0
 public static ILogHelperFactory AddLog4Net([NotNull] this ILogHelperFactory logHelperFactory,
                                            string configFilePath)
 {
     logHelperFactory.AddProvider(new Log4NetLogHelperProvider(configFilePath));
     return(logHelperFactory);
 }
Exemplo n.º 11
0
 public static ILogHelperFactory AddLog4Net([NotNull] this ILogHelperFactory logHelperFactory)
 {
     logHelperFactory.AddProvider(new Log4NetLogHelperProvider());
     return(logHelperFactory);
 }
Exemplo n.º 12
0
 public APIInfoViewModel(ILogHelperFactory log)
 {
     _log = log;
 }
Exemplo n.º 13
0
 public APIInfoViewModel()
 {
     _log = NinjectWebCommon.GetConcreteInstance<ILogHelperFactory>();
 }
Exemplo n.º 14
0
 public StockSymbolService(ILogHelperFactory log, IStockAppUnitOfWork unitOfWork)
 {
     _log = log;
     _unitOfWork = unitOfWork;
 }
Exemplo n.º 15
0
 public StockPriceViewModel(ILogHelperFactory log, IStockAppUnitOfWork unitOfWork)
 {
     _log        = log;
     _unitOfWork = unitOfWork;
 }
 public static ILogHelperFactory WithMinimumLevel(this ILogHelperFactory logHelperFactory, LogHelperLevel logLevel)
 {
     return(logHelperFactory.WithFilter(level => level >= logLevel));
 }
Exemplo n.º 17
0
 public APIInfoViewModel(ILogHelperFactory log)
 {
     _log = log;
 }
 public static ILogHelperFactory WithFilter(this ILogHelperFactory logHelperFactory, Func <Type, string, LogHelperLevel, Exception, bool> filterFunc)
 {
     logHelperFactory.AddFilter(filterFunc);
     return(logHelperFactory);
 }
        public static ILogHelperLogger GetLogger(this ILogHelperFactory logHelperFactory, Type type)
        {
            Guard.NotNull(logHelperFactory, nameof(logHelperFactory));

            return(logHelperFactory.CreateLogger(type.FullName ?? type.Name));
        }
Exemplo n.º 20
0
 public StockSymbolViewModel()
 {
     _log = NinjectWebCommon.GetConcreteInstance<ILogHelperFactory>();
     _unitOfWork = NinjectWebCommon.GetConcreteInstance<IStockAppUnitOfWork>();
 }
Exemplo n.º 21
0
 /// <summary>
 /// Set the  log factory to use
 /// </summary>
 /// <param name="logFactory">Log factory to use</param>
 public static void SetCurrent(ILogHelperFactory logFactory)
 {
     _currentLogFactory = logFactory;
 }
Exemplo n.º 22
0
 internal static void AddMicrosoftLogging(this ILogHelperFactory logHelperFactory, ILoggerFactory loggerFactory)
 {
     logHelperFactory.AddProvider(new MicrosoftLoggingLogHelperProvider(loggerFactory));
 }
 public static ILogHelperLogger GetLogger <T>(this ILogHelperFactory logHelperFactory) =>
 GetLogger(logHelperFactory, typeof(T));
Exemplo n.º 24
0
 public StockSymbolService(ILogHelperFactory log, IStockAppUnitOfWork unitOfWork)
 {
     _log        = log;
     _unitOfWork = unitOfWork;
 }
 public static ILogHelperFactory AddSerilog([NotNull] this ILogHelperFactory logHelperFactory,
                                            LoggerConfiguration loggerConfiguration)
 {
     logHelperFactory.AddProvider(new SerilogLogHelperProvider(loggerConfiguration));
     return(logHelperFactory);
 }