Beispiel #1
0
        public LogMessage SetContext(CallingMethodDetail detail)
        {
            if (detail == CallingMethodDetail.FullStack)
            {
                this.Set("context", StackReporter.GetCallingMethod(true, StackReporter.FullFormatStackFrame, 1));
            }
            else if (detail == CallingMethodDetail.LastMethod)
            {
                this.Set("context", StackReporter.GetCallingMethod(false, StackReporter.FullFormatStackFrame, 1));
            }

            return(this);
        }
Beispiel #2
0
 public Logger(string nameOfLogger)
 {
     logger           = log4net.LogManager.GetLogger(nameOfLogger);
     AddCallingMethod = CallingMethodDetail.None;
 }