public void appendLogMessageCCTS(LogMessageCCTS l)
        {
            if (IsDisposed)
            {
                Activate();
            }

            String s = "";

            s += l.level + " " + l.dateTime + "\n" + l.message + "\n";
            logWindow.AppendText(s);
        }
        private void Append(String message, Priority level, ErrorMessage e)
        {
            if (e == null)
            {
                e = new ErrorMessage("");
            }



            String now = DateTime.Now.ToString("hh:mm:ss");

            if (level >= minLogLevel)
            {
                LogMessageCCTS msg = new LogMessageCCTS(level.ToString(), now, message, e);

                //Every log message is reported to the VIENNAAddIn-messages window,
                //where it is displayed
                UMMAddInLoggerWindow ummLogger = new UMMAddInLoggerWindow();


                logMessages.Add(msg);
                if (isFileLogger)
                {
                    try
                    {
                        lock (monitor)
                        {
                            sw = File.AppendText(logDirectory);
                            sw.Write("[" + msg.level + "] ");
                            sw.Write(msg.dateTime + ": ");
                            sw.Write(msg.message + "\n");
                            sw.Flush();
                            sw.Close();
                        }
                    }
                    catch
                    {
                        // do nothing
                    }
                }
            }
        }