Ejemplo n.º 1
0
            public void WriteLine(string message, TraceLevel lvl = TraceLevel.TRACE)
            {
                var timestamp = UseTimeStamp ? DateTime.Now.ToString("u") + " " : "";

                var lvlStr = lvl == TraceLevel.NONE ? "" : $"[{lvl.ToString()}]:";

                lock (TraceStream)
                {
                    TraceStream.WriteLine($"{timestamp}{lvlStr}{message}");
                }
            }