Esempio n. 1
0
        private void _console_LineWrittenEvent(object sender, LineWrittenEventArgs e)
        {
            switch (e.Level.ToString())
            {
            case "Default":
                _logger.Debug(e.Value);
                break;

            case "Information":
                _logger.Info(e.Value);
                break;

            case "Warning":
                _logger.Warn(e.Value);
                break;

            case "Error":
                _logger.Error(e.Value);
                break;

            default:
                _logger.Error(string.Format("Unknown output level: {0}", e.Level));
                _logger.Info(e.Value);
                break;
            }

            Trace.WriteLine(e.Value, e.Level.ToString());
        }
Esempio n. 2
0
        private void _console_LineWrittenEvent(object sender, LineWrittenEventArgs e)
        {
            switch (e.Level.ToString())
            {
                case "Default":
                    _logger.Debug(e.Value);
                    break;
                case "Information":
                    _logger.Info(e.Value);
                    break;
                case "Warning":
                    _logger.Warn(e.Value);
                    break;
                case "Error":
                    _logger.Error(e.Value);
                    break;
                default:
                    _logger.Error(string.Format("Unknown output level: {0}", e.Level));
                    _logger.Info(e.Value);
                    break;
            }

            Trace.WriteLine(e.Value, e.Level.ToString());
        }
Esempio n. 3
0
 internal override void OnLineWrittenEvent(LineWrittenEventArgs e)
 {
     base.OnLineWrittenEvent(e);
 }
Esempio n. 4
0
 internal virtual void OnLineWrittenEvent(LineWrittenEventArgs e)
 {
     LineWrittenEvent?.Invoke(this, e);
 }
Esempio n. 5
0
 private void CommandLogWritten(object sender, LineWrittenEventArgs args)
 {
     commandLog.Add(args.Line);
 }
Esempio n. 6
0
 internal override void OnLineWrittenEvent(LineWrittenEventArgs e)
 {
 }
Esempio n. 7
0
 private void _console_LineWrittenEvent(object sender, LineWrittenEventArgs e)
 {
     Trace.WriteLine(e.Value, e.Level.ToString());
 }
 private void _systemConsoleBase_LineWrittenEvent(object sender, LineWrittenEventArgs e)
 {
     SendToClient(e.Value);
 }