public void OnMessage(long threadId,
                       TraceLevel level,
                       Datetime dateTime,
                       String
                       loggerName,
                       String message)
 {
     System.Console.WriteLine(dateTime + "  " + loggerName
                              + " [" + level.ToString() + "] Thread ID = "
                              + threadId + " " + message);
 }
        public static void SendSetLivingTraceLevel(LivingObject living, System.Diagnostics.TraceLevel traceLevel)
        {
            var args = new Dictionary <string, object>()
            {
                { "livingID", living.ObjectID },
                { "traceLevel", traceLevel.ToString() },
            };

            var script =
                @"l = world.GetObject(livingID)
t = l.Trace
tl = t.TraceLevel.Parse(t.TraceLevel.GetType(), traceLevel)
t.TraceLevel = tl
";

            var msg = new Dwarrowdelf.Messages.IPScriptMessage(script, args);

            GameData.Data.User.Send(msg);
        }