Example #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);
     }
 }
Example #2
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);

                if (OnMessageLogged != null)
                    OnMessageLogged(Msg);
                else
                    Debug.WriteLine(Msg.Message);
            }
        }
Example #3
0
        private void Logger_OnMessageLogged(GonzoNet.LogMessage Msg)
        {
            switch (Msg.Level)
            {
            case GonzoNet.LogLevel.info:
                Logger.LogInfo(Msg.Message);
                break;

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

            case GonzoNet.LogLevel.warn:
                Logger.LogWarning(Msg.Message);
                break;
            }
        }
 private void Logger_OnMessageLogged(GonzoNet.LogMessage Msg)
 {
     Log.LogThis(Msg.Message, (eloglevel)Msg.Level);
 }
Example #5
0
 private void Logger_OnMessageLogged(LogMessage Msg)
 {
     switch (Msg.Level)
     {
         case LogLevel.info:
             Logger.LogInfo(Msg.Message);
             break;
         case LogLevel.error:
             Logger.LogDebug(Msg.Message);
             break;
         case LogLevel.warn:
             Logger.LogWarning(Msg.Message);
             break;
     }
 }
Example #6
0
 private static void Logger_OnMessageLogged(LogMessage Msg)
 {
     Console.WriteLine("Gonzo: " + Msg.Message);
 }