private Trace() { _writers = new List <TextWriter>(); try { string traceValue = Environment.GetEnvironmentVariable(EnvironmentVariableKey); // if the value is true or a number greater than zero, then trace to standard error if (Configuration.PaserBoolean(traceValue)) { _writers.Add(Console.Error); } // if the value is a rooted path, then trace to that file and not to the console else if (Path.IsPathRooted(traceValue)) { // open or create the log file var stream = File.Open(traceValue, FileMode.Append, FileAccess.Write, FileShare.ReadWrite); // create the writer and add it to the list var writer = new StreamWriter(stream, Encoding.UTF8, 4096, true); _writers.Add(writer); } } catch { /* squelch */ } }