/// <summary>
        /// Create a new instance of <see cref="FutureLogEventDescriptor"/>
        /// </summary>
        /// <param name="callerInfo"></param>
        /// <param name="loggerLifetimeContextData"></param>
        public FutureLogEventDescriptor(ILogCallerInfo callerInfo, ContextData loggerLifetimeContextData)
        {
            _callerInfo                = callerInfo ?? NullLogCallerInfo.Instance;
            _ownLifetimeContextData    = new ContextData();
            _loggerLifetimeContextData = loggerLifetimeContextData;

            Context = new LogEventContext(_ownLifetimeContextData);
        }
Exemplo n.º 2
0
 public ManuallyLogEventDescriptor(LogEventId eventId, LogEventLevel level, Exception exception, string messageTemplate,
                                   ILogCallerInfo callerInfo, LogEventContext context = null, params object[] messageTemplateParameters)
 {
     EventId                   = eventId;
     Level                     = level;
     Exception                 = exception;
     MessageTemplate           = messageTemplate;
     CallerInfo                = callerInfo;
     Context                   = context;
     MessageTemplateParameters = messageTemplateParameters;
 }
Exemplo n.º 3
0
 public static IEnumerable <IAdditionalOperation> Filter(LogEventContext context, Type flagType, AdditionalOperationTypes optType)
 {
     if (context == null)
     {
         return(ReturnEmptyAdditionalOperations());
     }
     if (flagType == null)
     {
         return(ReturnEmptyAdditionalOperations());
     }
     return(FilterAfterChecking(context.ExposeOpts(), flagType, optType));
 }