예제 #1
0
        /// <summary>
        /// Logs a [Debug] line for specific for loading an item
        /// </summary>
        /// <param name="name">The name of the item</param>
        /// <param name="status">The status of the loading</param>
        /// <param name="always">Logs the line even if _debug is false</param>
        public static void Debug(string name, Status status, bool always = false)
        {
            try
            {
                if (status == Status.Start)
                {
                    if (Cfg.Debug || always)
                    {
                        Logger.Debug("Loading" + name + "....");
                    }

                    if (status == Status.Stop)
                    {
                        if (Cfg.Debug || always)
                        {
                            Logger.Debug(name + "loaded");
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Log.e(e);
            }
        }
예제 #2
0
 /// <summary>
 /// Logs the line with a [Debug] prefix if only the _debug is true
 /// </summary>
 /// <param name="prefix">Adds another prefix after [Debug]</param>
 /// <param name="message">The message thats hould be logged</param>
 /// <param name="always">Logs the line even if _debug id false</param>
 /// <param name="type">Where should the message be logged</param>
 public static void Debug(string prefix, string message, bool always = false, LogType type = LogType.Console)
 {
     try
     {
         if (Cfg.Debug || always)
         {
             Logger.Debug("[" + prefix + "]" + message, type);
         }
     }
     catch (Exception e)
     {
         Log.e(e);
     }
 }
예제 #3
0
 /// <summary>
 /// Logs the line with a [Debug] prefix only if _debug is true
 /// </summary>
 /// <param name="message">The message that should be logged</param>
 /// <param name="always">Logs the line even if _debug is false</param>
 /// <param name="type">Where should the message be logged</param>
 public static void Debug(string message, bool always = false, LogType type = LogType.Console)
 {
     try
     {
         if (QPatch._debug || always)
         {
             Logger.Debug(message, type);
         }
     }
     catch (Exception e)
     {
         Log.e(e);
     }
 }