Ejemplo n.º 1
0
 public BasicResolver(IEnumerable <IAppender> appenders, Level level, LogEventPoolExhaustionStrategy logEventPoolExhaustionStrategy, LogEventArgumentExhaustionStrategy logEventArgumentExhaustionStrategy)
 {
     _level = level;
     _logEventPoolExhaustionStrategy     = logEventPoolExhaustionStrategy;
     _logEventArgumentExhaustionStrategy = logEventArgumentExhaustionStrategy;
     _appenders = appenders.Select(x => new GuardedAppender(x, TimeSpan.FromSeconds(15))).ToArray <IAppender>();
 }
Ejemplo n.º 2
0
        internal void ResetConfiguration()
        {
            var config = _logManager?.ResolveLogConfig(Name);

            Appenders = config?.Appenders ?? Array.Empty <IAppender>();
            LogEventPoolExhaustionStrategy     = config?.LogEventPoolExhaustionStrategy ?? default;
            LogEventArgumentExhaustionStrategy = config?.LogEventArgumentExhaustionStrategy ?? default;
            _logLevel = config?.Level ?? Level.Fatal;
        }
Ejemplo n.º 3
0
 public void Initialize(Level level, Log log, LogEventArgumentExhaustionStrategy argumentExhaustionStrategy)
 {
     Timestamp    = SystemDateTime.UtcNow;
     Level        = level;
     _log         = log;
     _argCount    = 0;
     _dataPointer = _startOfBuffer;
     _isTruncated = false;
     _argumentExhaustionStrategy = argumentExhaustionStrategy;
     ThreadId = Thread.CurrentThread.ManagedThreadId;
 }
Ejemplo n.º 4
0
 public void Initialize(Level level, Log log, LogEventArgumentExhaustionStrategy argumentExhaustionStrategy)
 {
 }