Пример #1
0
        private void OnDebugOutput(BkDebugOutput msg)
        {
            // Strip unnecessary prefixes that were meant for editor log output
            var message = msg.Message;

            if (message.StartsWith("[Osiris] "))
            {
                message = message.Substring(9);
                if (message.StartsWith("{W}") || message.StartsWith("{I}") || message.StartsWith("{E}"))
                {
                    message = message.Substring(4);
                }
            }

            switch (msg.Severity)
            {
            case BkDebugOutput.Types.Severity.LevelDebug:
            case BkDebugOutput.Types.Severity.LevelInfo:
                SendOutput("stdout", message + "\r\n");
                break;

            case BkDebugOutput.Types.Severity.LevelWarning:
                SendOutput("console", message + "\r\n");
                break;

            case BkDebugOutput.Types.Severity.LevelError:
                SendOutput("stderr", message + "\r\n");
                break;
            }
        }
Пример #2
0
 private void OnDebugOutput(BkDebugOutput msg)
 {
     SendOutput("stdout", "DebugBreak: " + msg.Message + "\r\n");
 }