public void addLogLine(String sender, String msg, log4net.Core.Level severity) { if (messageLog.InvokeRequired) { AddLogLineCallback ac = new AddLogLineCallback(addLogLine); this.BeginInvoke(ac, new object[] { sender, msg, severity }); } else { if (severity.Equals(log4net.Core.Level.Error)) { messageLog.Text += "(!!!) "; } else if (severity.Equals(log4net.Core.Level.Warn)) { messageLog.Text += "(!) "; } else if (severity.Equals(log4net.Core.Level.Debug)) { messageLog.Text += "(D) "; } if (sender.StartsWith("SkypeBot.plugins.")) { messageLog.Text += String.Format("{0}: {1}", sender.Split('.').Last<String>(), msg) + Environment.NewLine; } else { messageLog.Text += msg + Environment.NewLine; } messageLog.SelectionStart = messageLog.Text.Length; messageLog.ScrollToCaret(); } }