All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Allocation and string optimisation pass across the logging hot path. A plain Chirp.Logger.Log("...") submitted through the pipeline is now allocation-free on the library side.
ChirpLoginstances are now pooled (per-thread, safe for logging from any thread: main thread, Task thread pool, Unity job workers, UniTask continuations).ChirpLog.Copy()— creates a non-pooled, caller-owned snapshot for outputs that need to retain log data beyondIngest()(file writers, network batches).- Editor-only diagnostics: accessing a
ChirpLogafter it was released back to the pool logs an error pointing atCopy(). Zero cost in players. Tests/assembly with per-shape allocation budget tests and markdown golden tests that pin parser output byte-for-byte against the previous implementation.- Console output routes through Unity's internal
DebugLogHandler.Internal_Logvia a cached reflection delegate. This gives a per-callLogOption(see Changed, below) and skips the full-messagestring.Formatcopy Unity's publicILogHandlerAPI performs on every log. Falls back to the public API silently if the internal method is missing (see README for IL2CPPlink.xmlnote).
- Lifetime contract: a
ChirpLogis valid only untilSubmitreturns.IChirpOutputimplementations must not retain instances beyondIngest()— useChirpLog.Copy(). (Retaining was never supported: previouslySubmitdisposed and nulled the log immediately after dispatch.) - The
[<color=#…>Name</color>]channel prefix is now built once perChirpLoggerinstead of being re-formatted on every log. - Markdown parser rewritten from Remove/Insert patching to single-pass cursor-walk emission — same output (golden-tested), a fraction of the intermediate string churn, and plain text without markdown characters now bypasses the regex entirely.
- Code-block JSON pretty-printing is only attempted when the block content starts with
{or[— non-JSON blocks no longer pay for a thrownJsonReaderExceptionper log. (Bare JSON scalars in code blocks are no longer reformatted.) - Stack-trace formatter caches per-method signature fragments and avoids per-frame
Substring/Replace/int.ToStringallocations. ChirpLog.Contextnow holds a strong reference for the (sub-millisecond) lifetime of the pooled log instead of allocating aWeakReferenceper contextful log.- Intercepted
Debug.Log(object)calls skip thestring.Formatcopy for the standard"{0}"format.
- Finalizers on
ChirpLogandChirpLogger— every log no longer passes through the GC finalization queue.
Better handling of plugin lifecycles.
- Plugin lifecycle handling
Chirp.AddPluginandChirp.RemovePluginAPI for managing plugins
IChirpInputandIChirpOutputnow are inheriting from IChirpPluginAbstractChirpPluginnow has base functionality for disposal handling
- Removed
Chirp.AddInputandChirp.AddOutputAPI in favour ofChirp.AddPlugin
Tighter Unity Integration
- Ability to pass Context as part of string APIs
- Context tracking on ChirpLog
- Add extra AddInput, AddOutput oveloads to Chirp class
- Add RemoveOutput for removing an output
- Add Input for UnityConsoleLogger so we can intercept logs as well as push them to the default Console - useful if we want all logs to be redirected
- Rename UnityConsoleOutput to UnityConsolePlugin
Unity 6 compatibility
- Fix: Builds failing due to LoggingMarkdownUtil editor testing methods.
- Fix: Editor settings window would throw errors due to changes in embedded icons
- Updated readme
- Big changes to the structure and way of interacting with the system.
- Use Chirp.Logger.Log/Info/Warn... for logging on the default channel.
- Use Chirp.Channels.Create() to create a specific channel logger.
- Strings can now be converted to ChirpLogs by calling
"Some string".AsChirpLog()and provide extra options. "Some string".AsChirpLog().AsMarkdown()will indicate that the logs have any of the supported Markdown tags- Use ChirpLogs when logging
Chirp.Logger.Log("Some string".AsChirpLog().AsMarkdown()) - Use
Chirp.Logger.Log("Some string".AsMarkdownLog()) - You can use any object and convert it to a json representation in markdown
Chirp.Logger.Log(someObjectInstance.AsChirpLog())
- All "Ch" APIs:
DebugCh,LogCh,InfoCh,WarningCh,ErrorCh,ExceptionCh- moving towards dedicated channel loggers
- LogChannel instance can now be used to invoke specific logs with that Channel
- New Unity no longer allows you to paste stack traces in the message - reverted back to using UnityEngine native console stack trace.
- You can select Console > Strip Logging Callback to strip unnecessary stack trace entries.
- Fix: Formatting of Unity logs with {} will no longer cause exceptions
- Docs update, added screenshots
- Chirp Initializer and component structure for creating easy initialization objects.
- Added conditional to Chirp.Initialize() method.
- Fixes to how Chirp interacts with Unity Debug Logging methods.
- Fixes to Stack Trace construction
- Fix for the default order of execution between Awake and RuntimeInitializeOnLoadMethod attributed methods.
- Added a Project Settings window for configuring Chirp per target platform.
- Added CHIRP script define for enabling the framework.
- Updated the readmes and install instructions.
- Exceptions logging is always enabled when Chirp is enabled.
- Errors and Exceptions added to conditional logging customisation.
- Initial release of Chirp framework.