Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-292

Managed ColoredConsoleAppender for .NET2/Mono.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.11
    • 1.2.12
    • Appenders
    • None

    Description

      The original ColoredConsoleAppender was written before the .NET framework (and Mono) had built-in support for console colors so it was written using Win32 API calls. The AnsiColorTerminalAppender, while it works, isn't understood by the Windows command prompt so there's no console appender that works on both environments.

      I'm attaching a replacement for both classes that uses the new (.NET 2) console colors and works on both platforms. It is based on the existing ColoredConsoleAppender. The color mapping values are not compatible with the previous version since this one uses the standard .NET 2 ConsoleColor enumeration values.

      Attachments

        1. ColoredConsoleAppender2.cs
          10 kB
          Pavlos Touboulidis
        2. config-examples.patch
          2 kB
          Pavlos Touboulidis

        Activity

          People

            Unassigned Unassigned
            pav Pavlos Touboulidis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: