Merge branch 'master' of git://github.com/TShock/TShock

This commit is contained in:
Twitchy 2011-06-20 22:15:08 +12:00
commit 24f49c407e

View file

@ -117,7 +117,17 @@ namespace TShockAPI
return;
}
string caller = "TShock";
StackTrace trace = new StackTrace();
StackFrame frame = null;
frame = trace.GetFrame(2);
string caller = "TShock: ";
if (frame != null && frame.GetMethod().DeclaringType != null)
{
caller += frame.GetMethod().DeclaringType.Name + ": ";
}
_logWriter.WriteLine(string.Format("{0} - {1}: {2}: {3}",
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),