示例#1
0
            public void Log(LogLevel level, string message)
            {
                LogMessage logMessage = new LogMessage(level, message);

                lock (Messages) {
                    Messages.Add(logMessage);
                    switch (level)
                    {
                    case LogLevel.Fatal: ErrorCount++; break;

                    case LogLevel.Error: ErrorCount++; break;

                    case LogLevel.Warn:  WarningCount++; break;

                    case LogLevel.Info:  InfoCount++; break;

                    case LogLevel.Debug: DebugCount++; break;
                    }
                }

                if (level == LogLevel.Fatal)
                {
                    if (errorNotificationEnabled)
                    {
                        Gtk.Application.Invoke(delegate {
                            InternalLog.NotifyError(logMessage);
                        });
                    }
                    else
                    {
                        LastError = logMessage;
                    }
                }
            }
示例#2
0
            public void Log(LogLevel level, string message)
            {
                LogMessage logMessage = new LogMessage(level, message);

                if (level == LogLevel.Fatal)
                {
                    if (errorNotificationEnabled)
                    {
                        Gtk.Application.Invoke(delegate {
                            InternalLog.NotifyError(logMessage);
                        });
                    }
                    else
                    {
                        LastError = logMessage;
                    }
                }
            }