Urgent.News

What's breaking now, across thousands of outlets.

Tech

๐Ÿฌ Candy Logger v2.1.0 - The Correctness Release

Candy Logger v2.1.0 is now available. This release focuses on making Candy Logger correct, secure, reliable, and production-ready . Version 2.1.0 improves serialization, security, console interception, persistence, UI behavior, accessibility, mobile support, and the underlying architecture. It also introduces a cleaner core API that allows Candy Logger to be used without rendering the UI. GitHubโ€ฆ

Version 2.1.0 of the Candy Logger library has been released, with a focus on improving the accuracy, security, and reliability of the logging experience. This version addresses a variety of edge cases and modern development environments to ensure that the logger remains robust and dependable.

One of the key improvements in this release is the safer handling of object serialization. Previously, serialized circular objects could lead to a TypeError being thrown out of the logger, disrupting the debugging process. This version of Candy Logger now handles circular references gracefully, preventing such issues from occurring.

Another significant enhancement is the better serialization of JavaScript Error objects. Earlier versions of Candy Logger had difficulties displaying all the relevant debugging information contained within JavaScript Error objects. Version 2.1.0 can now serialize and display the message, stack trace, cause, and even custom error properties, providing developers with more comprehensive error information for diagnosis.

The release also expands the range of supported JavaScript types. Candy Logger can now safely serialize a wider variety of JavaScript values, including Map, Set, Date, RegExp, BigInt, Symbol, functions, DOM nodes, circular objects, and error objects. This simplifies the process of logging complex data structures without the need for manual conversion to plain JSON.

Security and XSS protection have been strengthened in this version. Version 2.1.0 treats logging values as data rather than executable HTML, mitigating the risk of cross-site scripting attacks. Additionally, the logger is fully compatible with a strict Content Security Policy (CSP), ensuring that UI interactions and event handlers are handled securely.

The console override functionality in Candy Logger was previously prone to creating stacked panels or duplicated logs when called multiple times, especially in modern development environments like React. Version 2.1.0 has made the `overrideConsole()` method idempotent, meaning it can be called multiple times without creating additional interception layers. This ensures a consistent and reliable logging experience across different runtime environments.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

More from Saturday 15 August โ†’