예제 #1
0
        /// <summary>
        /// Creates the log handler for the target using the configured values.
        /// </summary>
        /// <returns>the created <see cref="LogCallHandler"/>.</returns>
        public override ICallHandler CreateHandler()
        {
            LogCallHandler handler = new LogCallHandler();

            SetCategories(handler);
            handler.EventId           = eventId;
            handler.LogAfterCall      = logAfterCall;
            handler.LogBeforeCall     = logBeforeCall;
            handler.BeforeMessage     = beforeMessage;
            handler.AfterMessage      = afterMessage;
            handler.IncludeParameters = includeParameters;
            handler.IncludeCallStack  = includeCallStack;
            handler.IncludeCallTime   = includeCallTime;
            handler.Priority          = priority;
            handler.Severity          = severity;

            return(handler);
        }
예제 #2
0
 private void SetCategories(LogCallHandler handler)
 {
     handler.Categories.Clear();
     handler.Categories.AddRange(categories);
 }