public IntervalLogger(object title, IMainElapsedAction action) : base() { this.Record = new LogRecord(); //var t = title.ToStringX(); //if(!t.NullOrEmpty()) { this.Record.Title = t; } //if(null != action) { this.Action = action; } // Tid //ScopeContext.Current.Scope.Tid = this.Record.Tid; // MethodBase var sf = RunTime.CalleeStackFrameBeyond("Log"); if (null != sf) { this.Method = sf.GetMethod(); this.Record.Path = this.Method.Path(); this.Record.Title = this.Record.Title.NullOrEmpty() || this.Record.Title.Contains("IntervalLogger") ? this.Method.Description() : this.Record.Title; this.Record.Method = this.Method; } }
public static ILogger Create( IMainElapsedAction action, params string[] titleParts) { return(new ILogger( titleParts.Join(Symbol.Period), action )); }
public ILogger(object title, IMainElapsedAction action) : base(title, action) { }
public ILogger(IMainElapsedAction action) : this(null, action) { }
public IntervalLogger(IMainElapsedAction action) : this(string.Empty, action) { }