public void SetColors(ConsoleColors colors)
        {
            if (skipColors)
            {
                return;
            }

            try {
                if (colors.Background.HasValue)
                {
                    Console.BackgroundColor = colors.Background.Value;
                }
                if (colors.Foreground.HasValue)
                {
                    Console.ForegroundColor = colors.Foreground.Value;
                }
            } catch (SecurityException) {
                skipColors = true;
            } catch (IOException) {
                skipColors = true;
            }
        }
        private void UpdateColors(LoggerLevel level)
        {
            ConsoleColors colors = this.colorMappingsCache[level];

            console.SetColors(colors);
        }