add timestamps to log messages. This probably needs to all be cleaned up

with a real logging module later, but this should make reading logs easier
for now
afrisby
Sean Dague 2007-09-12 10:54:34 +00:00
parent 5ade01bb49
commit 26a67d998c
1 changed files with 3 additions and 0 deletions

View File

@ -247,10 +247,13 @@ namespace OpenSim.Framework.Console
private void WriteNewLine(ConsoleColor color, string format, params object[] args) private void WriteNewLine(ConsoleColor color, string format, params object[] args)
{ {
string now = System.DateTime.Now.ToString("[MM-dd hh:mm:ss] ");
Log.Write(now);
Log.WriteLine(format, args); Log.WriteLine(format, args);
Log.Flush(); Log.Flush();
if (!m_silent) if (!m_silent)
{ {
System.Console.Write(now);
try try
{ {
if (color != ConsoleColor.White) if (color != ConsoleColor.White)