Пример #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);
     }
 }
        private void Logger_OnMessageLogged(ProtocolAbstractionLibraryD.LogMessage Msg)
        {
            switch (Msg.Level)
            {
            case ProtocolAbstractionLibraryD.LogLevel.error:
                Log.LogThis(Msg.Message, eloglevel.error);
                break;

            case ProtocolAbstractionLibraryD.LogLevel.info:
                Log.LogThis(Msg.Message, eloglevel.info);
                break;

            case ProtocolAbstractionLibraryD.LogLevel.warn:
                Log.LogThis(Msg.Message, eloglevel.warn);
                break;
            }
        }
Пример #3
0
        void Logger_OnMessageLogged(ProtocolAbstractionLibraryD.LogMessage Msg)
        {
            switch (Msg.Level)
            {
            case ProtocolAbstractionLibraryD.LogLevel.info:
                Logger.LogInfo(Msg.Message);
                break;

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

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