예제 #1
0
        /// <summary>
        /// <para>Used to notify of problems where corrective (fallback) actions are possible.</para>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public static void LogWarning(string message, params object[] args)
        {
            if (BehaviorLoggingContext != null)
            {
                BehaviorLoggingContext.LogMessage("warning", message, args);
                return;
            }

            Logging.Write(Colors.DarkOrange, message, args);
        }
예제 #2
0
        /// <summary>
        /// <para>Normal information to keep user informed.</para>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public static void LogInfo(string message, params object[] args)
        {
            if (BehaviorLoggingContext != null)
            {
                BehaviorLoggingContext.LogMessage("info", message, args);
                return;
            }

            Logging.Write(Colors.CornflowerBlue, message, args);
        }
예제 #3
0
        /// <summary>
        /// <para>Error situations occur when bad data/input is provided, and no corrective actions can be taken.</para>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public static void LogError(string message, params object[] args)
        {
            if (BehaviorLoggingContext != null)
            {
                BehaviorLoggingContext.LogMessage("error", message, args);
                return;
            }

            Logging.Write(Colors.Red, message, args);
        }
예제 #4
0
        /// <summary>
        /// <para>For DEBUG USE ONLY--don't use in production code! (Almost exclusively used by DebuggingTools methods.)</para>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public static void LogDeveloperInfo(string message, params object[] args)
        {
            if (BehaviorLoggingContext != null)
            {
                BehaviorLoggingContext.LogMessage("debug", message, args);
                return;
            }

            Logging.WriteDiagnostic(Colors.LimeGreen, message, args);
        }
예제 #5
0
        /// <summary>
        /// <para>Error situations occur when bad data/input is provided, and no corrective actions can be taken.</para>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public static void LogFatal(string message, params object[] args)
        {
            if (BehaviorLoggingContext != null)
            {
                BehaviorLoggingContext.LogMessage("fatal", message, args);
                return;
            }

            Logging.Write(Colors.Red, message, args);
            TreeRoot.Stop("Fatal error in quest behavior, or profile.");
        }