public LoggerRoot(string outputFile, bool directLogToFile, string location, string starttext) { m_outputfile = outputFile; m_directLogToFile = directLogToFile && !String.IsNullOrEmpty(outputFile); m_oldest = new LogEntry( UniqueInteger.Get(), DateTime.Now, System.Threading.Thread.CurrentThread.ManagedThreadId, location, starttext); m_newest = m_oldest; m_rootLogger = new Logger(this, m_newest).GetProtectedLogger(); // Cannot be disposed by accident, then. if (m_sink != null) { m_sink.Add(m_newest); } }
private LogEntry Log(LogEntry.Type type, string location, string text) { return(m_root.Log(m_scopeStartEntry, type, UniqueInteger.Get(), DateTime.Now, m_threadID, location, text)); }