示例#1
0
 /// <summary>
 /// Called by classes in GonzoNet to log a message.
 /// </summary>
 /// <param name="Msg"></param>
 public static void Log(string Message, LogLevel Lvl)
 {
     if (GlobalSettings.Default.DEBUG_BUILD)
     {
         LogMessage Msg = new LogMessage(Message, Lvl);
         OnMessageLogged(Msg);
     }
 }
示例#2
0
        private void Logger_OnMessageLogged(CityDataModel.LogMessage Msg)
        {
            switch (Msg.Level)
            {
            case CityDataModel.LogLevel.info:
                Logger.LogInfo(Msg.Message);
                break;

            case CityDataModel.LogLevel.error:
                Logger.LogDebug(Msg.Message);
                break;

            case CityDataModel.LogLevel.warn:
                Logger.LogWarning(Msg.Message);
                break;
            }
        }