Skip to content

Releases: vonhoff/Serilog.Sinks.RichTextBox.WinForms.Colored

v3.1.3

13 Jul 07:47
23cab11
Compare
Choose a tag to compare

Release Notes - Serilog.Sinks.RichTextBox.WinForms.Colored v3.1.3

What Changed

  • Fixed performance issues when logging large numbers of complex messages that could cause application freezing.
  • Fixed ArgumentOutOfRangeException thrown from RtfBuilder.Clear()

Resources

v3.1.2

07 Jul 07:26
67b6e61
Compare
Choose a tag to compare

Release Notes - Serilog.Sinks.RichTextBox.WinForms.Colored v3.1.2

What Changed

  • Fixed a bug where cross-thread log messages during form construction caused System.InvalidOperationException due to premature access of the RichTextBox.

Contributors

Resources

v3.1.1

03 Jul 10:37
a7c24e6
Compare
Choose a tag to compare

Release Notes - Serilog.Sinks.RichTextBox.WinForms.Colored v3.1.1

What Changed

  • Fixed a bug where the TextFormatter would crash when the value or format was null or empty.

Resources

v3.1.0

30 Jun 20:33
ce5d637
Compare
Choose a tag to compare

Release Notes - Serilog.Sinks.RichTextBox.WinForms.Colored v3.1.0

Feature Release

This feature release introduces the ability to clear and restore the RichTextBox sink output.

What Changed

  • Added Clear() and Restore() operations to the circular buffer/RichTextBox sink.

Resources

v3.0.1

28 Jun 22:35
Compare
Choose a tag to compare

Release Notes - Serilog.Sinks.RichTextBox.WinForms.Colored v3.0.1

Minor Release

This minor release focuses on config improvements and performance optimization.

What Changed

  • Adjusted MaxLogLines limit From 512 to 2048 lines.
  • Fixed a bug where the RichTextBox would not persist the zoom factor.
  • Optimized the Concurrent Circular Buffer

Resources

v3.0.0

21 Jun 21:13
1af5cb9
Compare
Choose a tag to compare

Serilog.Sinks.RichTextBox.WinForms.Colored v3.0.0

Major Release - Breaking Changes

This major release focuses on performance optimization, UI stability, and streamlined configuration while simplifying the configuration API.

Breaking Changes

  • Simplified Configuration Options: Reduced configurable options to focus only on the most relevant and commonly used settings:

    • Removed messageBatchSize parameter (no longer needed)
    • Removed messagePendingInterval parameter (no longer needed)
    • Renamed appliedTheme parameter to theme for consistency
  • Theme System Overhaul: Complete redesign of the theme system to align with the Serilog WPF sink. Previous theme names (Dark, Light, DarkClassic, LightClassic) have been replaced with new theme presets. All themes now include WCAG compliance with proper contrast ratio.

  • Enhanced Memory Management: The maxLogLines parameter now has improved validation (1-512 range) with a default of 256 lines to ensure optimal performance. While not mandatory, proper configuration is recommended to prevent performance degradation from excessive log entries in the WinForms control.

New Theme System

Available built-in themes:

Theme Description
ThemePresets.Literate Styled to replicate the default theme of Serilog.Sinks.Console (default)
ThemePresets.Grayscale A theme using only shades of gray, white, and black
ThemePresets.Colored A theme based on the original Serilog.Sinks.ColoredConsole sink
ThemePresets.Luminous A new light theme with high contrast for accessibility

The themes based on the original sinks are slightly adjusted to be WCAG compliant, ensuring that the contrast ratio between text and background colors is at least 4.5:1. Luminous is a new theme specifically created for this sink.

Bug Fixes

  • Fixed UI Freezing: Resolved critical UI freeze issues caused by SystemEvents when using RichTextBox controls on background threads.

  • Fixed Auto-scroll on .NET Framework: Corrected auto-scroll behavior that wasn't working properly on .NET Framework applications.

Performance Improvements

  • Optimized Rendering Logic: Removed the off-screen RichTextBox dependency and improved the rendering pipeline for better performance and reduced memory usage.

  • Streamlined Processing: Removed unnecessary batching parameters to simplify internal processing logic.

Migration Guide

Due to breaking changes, please update your existing configurations:

  1. Update Theme Names: Replace old theme names with new equivalents:

    • Dark or DarkClassicThemePresets.Colored or ThemePresets.Grayscale or ThemePresets.Literate
    • Light or LightClassicThemePresets.Luminous
  2. Update Parameter Names:

    • appliedThemetheme
    • Remove messageBatchSize and messagePendingInterval parameters (no longer supported)

I recommend pairing this sink with a file sink for persistent logging storage, as it's not practical to have thousands of log entries displayed in a RichTextBox control.

Recommended Configuration

Log.Logger = new LoggerConfiguration()
    .WriteTo.RichTextBox(richTextBox1, 
        theme: ThemePresets.Literate,
        maxLogLines: 64) // Optional, defaults to 256
    .WriteTo.File("logs/app-.txt", rollingInterval: RollingInterval.Day) // Recommended for persistence
    .CreateLogger();

Full Changelog

v2.1.2...v3.0.0

  • Reduced configurable options to only the most relevant ones (breaking change)
  • Renamed appliedTheme parameter to theme (breaking change)
  • Removed messageBatchSize and messagePendingInterval parameters (breaking change)
  • Completely redesigned theme system with new theme names and WCAG compliance (breaking change)
  • Added new Luminous theme for high contrast accessibility
  • Enhanced maxLogLines validation with 1-512 range limit
  • Fixed UI freeze caused by SystemEvents on background-thread RichTextBox
  • Optimized performance by removing the off-screen RichTextBox and improving rendering logic
  • Fixed auto-scroll issue on .NET Framework

Resources

v2.1.2

06 Jun 18:17
Compare
Choose a tag to compare

What's Changed

  • Fixed project metadata for NuGet.

Full Changelog: v2.1.0...v2.1.2

v2.1.1

06 Jun 17:56
Compare
Choose a tag to compare

What's Changed

Public Changes:

  • Replaced themes with newly designed themes.
  • Moved old themes to "DarkClassic" and "LightClassic".
  • Fixed bugs with the formatters (JSON and Literal).
  • Changed the default configuration for optimal performance.
  • Removed link detection, as it causes issues with the formatting.
  • Updated TargetFrameworks to include net9.0-windows, netcoreapp3.1-windows, and netcoreapp3.0-windows.

Internal Changes:

  • Added a lot of integration tests to reach at least 80% test coverage.
  • Removed useless code and cleaned up the project.
  • Replaced ConcurrentQueue with a BlockingCollection in the sink.

Full Changelog: v2.1.0...v2.1.1

v2.1.0

17 Mar 20:03
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.1.0

v2.0.0

08 Sep 06:38
290a7bb
Compare
Choose a tag to compare

What's changed

  • Added support for .NET 8
  • Added support for .NET Framework 4.5.2
  • Added outputTemplate and formatProvider to options

Previous changes

Contributors

Full Changelog: https://github.com/vonhoff/Serilog.Sinks.RichTextBox.WinForms.Colored/commits/v2.0.0