Releases: DMsuDev/vigil
Release list
v0.7.0
Vigil v0.7.0
This release introduces the Crash Guard Subsystem to capture fatal OS signals and unhandled exceptions with automatic stack traces before process termination.
🌟 What's New in v0.7.0
Crash Guard Subsystem
Vigil now features a cross-platform crash handling subsystem (vigil::CrashHandler) capable of intercepting fatal OS signals (SIGSEGV, SIGABRT, SIGFPE, SIGILL) and unhandled exceptions (std::terminate, std::bad_alloc, and pure virtual calls).
When a fatal fault occurs, Vigil captures a complete backtrace and formats a crash report to your log output before terminating, preventing silent crashes and aiding post-mortem debugging.
#include <vigil/vigil.h>
int main()
{
vigil::LogSystem::Init({ .Name = "App" });
// Install signal and exception handlers
vigil::CrashHandler::Install();
// Fatal crashes are now intercepted and logged with stack traces
int* ptr = nullptr;
*ptr = 42; // SIGSEGV captured and logged automatically
vigil::LogSystem::Shutdown();
}Full Changelog: v0.6.1...v0.7.0
v0.7.0-WIP
Warning
This is a work-in-progress prerelease and is not intended for production use.
APIs may change without notice. Pin to a stable release tag for production.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Conventional Commits and this project adheres to Semantic Versioning.
[0.7.0-WIP] - 2026-09-24
🚀 Features
-
Add crash guard subsystem (569ee0a)
Implement cross-platform crash handling to intercept fatal signals and
unhandled exceptions.
🛠️ Build System
-
Enable crash tests in CI presets (05be089)
- Enable
VIGIL_CRASH_TESTSin CI configure presets. - Specify
Debugconfiguration for thewindows-devtest preset.
- Enable
🔧 Maintenance
-
Discover unit test sources dynamically (2bb5659)
-
Refine integration test labels by mechanism (a75ed09)
-
Add crash integration test harness (9616612)
Add a dedicated integration test suite under
tests/crashto validate Vigil's
crash handling infrastructure against real runtime faults.Key changes:
- Option Flag: Introduce
VIGIL_CRASH_TESTSoption in the main CMake build. - Standalone Consumer: Build an isolated consumer executable using CTest's
--build-and-testmechanism. - Trigger Coverage: Register individual tests for SIGSEGV, SIGABRT, SIGFPE, SIGILL,
std::terminate, bad_alloc, pure virtual calls, and OS-specific fault triggers.
- Option Flag: Introduce
-
Restructure integration workflow to include crash tests (e58d243)
Rename
install-tests.ymltointegration.ymland update the README badge to reflect the broader test scope.- Consolidate consumer tests into a single
consumerjob. - Add a dedicated
crashjob to run theVIGIL_CRASH_TESTSsuite. - Standardize CMake variables and CTest labels across platforms.
- Consolidate consumer tests into a single
Full Changelog: v0.6.1...v0.7.0-WIP
v0.6.1
Vigil v0.6.1
Vigil v0.6.1 brings key performance optimizations, streamlined build structures, and improved developer tooling.
-
Faster Scope Handling: Replaced string copies with
std::string_viewto eliminate unnecessary allocations, added adaptive time formatting ($\mu s$ vs.$ms$ ), and guaranteednoexceptsafety during destruction. -
Refined API & Docs: Added
ToString()forLogLevelenums and expanded Doxygen coverage across core and logging headers. -
Organized Build System: Restructured example targets into
logging/anddiagnostics/categories, featuring a redesignedvigil_add_exampleCMake helper for cleaner IDE integration.
Full Changelog: v0.6.0...v0.6.1
v0.6.0
🚀 Vigil v0.6.0
This release introduces deferred log file creation, granular per-logger asynchronous settings, a comprehensive consumer integration test suite, and build system optimizations across supported compilers.
⚠️ Important: This release contains Breaking Changes to public macro names and preprocessor severity constants. Please review the migration guide below.
💥 Breaking Changes & Migration Guide
Public logging macros and preprocessor constants have been renamed to standardize the API surface and prevent symbol collisions.
VIGIL_LOG_Prefix for Logging Macros: Convenience macros now explicitly use theVIGIL_LOG_prefix.- Standardized Severity Level Constants: Preprocessor constants changed from
VIGIL_LOG_LEVEL_*toVIGIL_LEVEL_*.
🔄 Migration Mapping
| Legacy API (<= v0.5.x) | New API (v0.6.0) |
|---|---|
VIGIL_INFO(...) |
VIGIL_LOG_INFO(...) |
VIGIL_WARN(...) |
VIGIL_LOG_WARN(...) |
VIGIL_ERROR(...) |
VIGIL_LOG_ERROR(...) |
VIGIL_TRACE(...) |
VIGIL_LOG_TRACE(...) |
VIGIL_LOG_LEVEL_INFO |
VIGIL_LEVEL_INFO |
VIGIL_LOG_LEVEL_WARN |
VIGIL_LEVEL_WARN |
✨ What's New & Improvements
🚀 Key Features
- Lazy File Sinks (
LazyFileSink): Defers physical log file creation on disk until the first log message is dispatched, preventing empty log files. - Per-Logger Async Configuration:
LogConfignow supports individualAsyncenabling andAsyncQueueSizeoverrides per logger instance. - Lazy Thread Pool Initialization: Global
spdlogthread pool setup is now deferred viaEnsureAsyncThreadPool.
🧪 Integration Testing & Quality
-
Consumer Integration Test Suite (
VIGIL_CONSUMER_TESTS): Addedctest --build-and-testharnesses covering all supported integration patterns:- Direct vendoring via
add_subdirectory(). - External fetch via
FetchContent. - System package consumption via
find_package(Vigil CONFIG).
- Direct vendoring via
-
Expanded Coverage: Dedicated unit tests for assertions (
VIGIL_VERIFY,VIGIL_ASSERT), lifecycle hooks (OnMessage,OnLevelChange,OnFlush,OnShutdown), and isolated test paths.
🛠️ Build System (CMake)
- Accelerated Builds: Enabled MSVC multi-processor compilation (
/MP). - Dead-Code Stripping: Configured cross-platform link/compile flags for dead-code elimination under GCC, Clang, and MSVC.
- Dependency Flow: Enforced system
fmtusage validation whenever installation targets are enabled.
🐛 Bug Fixes
- Removed the conditional guard around
vigil/assert.hinlog_system.hto preventReleasebuild compilation errors. - Added missing
debugger.hto the installed header set (VIGIL_INTERNAL_HEADERS). - Fixed all
option()defaults being evaluated beforeproject(), causing incorrect values when consumed as a subproject viaadd_subdirectory.
New Contributors
- @dependabot[bot] made their first contribution in #4
Full Changelog: v0.5.1...v0.6.0
v0.6.0-WIP
Warning
This is a work-in-progress prerelease and is not intended for production use.
APIs may change without notice. Pin to a stable release tag for production.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Conventional Commits and this project adheres to Semantic Versioning.
[0.6.0-WIP] - 2026-09-07
💥 Breaking Changes
-
Rename public logging macros and preprocessor constants (01f6309)
- Rename main convenience macros (e.g., VIGIL_INFO, VIGIL_WARN) to use the explicit VIGIL_LOG_* prefix.
- Standardize preprocessor severity level constants from VIGIL_LOG_LEVEL_* to VIGIL_LEVEL_*.
- Introduce a centralized VIGIL_LOG_IMPL dispatch macro leveraging
if constexprfor compile-time filtering.
⚠️ The main logging macros (such as VIGIL_INFO, VIGIL_WARN, VIGIL_ERROR, etc.) now require the VIGIL_LOG_ prefix (e.g., VIGIL_LOG_INFO), and preprocessor severity constants have been renamed from VIGIL_LOG_LEVEL_* to VIGIL_LEVEL_*, breaking backward compatibility for API consumers.
🚀 Features
-
Add lazy file sinks and per-logger async configuration (49ad6e9)
- Introduce
LazyFileSinkto defer physical file creation until the first log message is written - Extend
LogConfigwith optionalAsyncandAsyncQueueSizeoverrides for individual loggers - Implement lazy initialization of the global
spdlogthread pool viaEnsureAsyncThreadPool - Standardize pointer allocations across the logging subsystem using custom
SmartPointersutilities
- Introduce
🐛 Bug Fixes
-
Ensure assertion header is always included for release builds (3a67ce5)
- Remove the
#if defined(VIGIL_ENABLE_ASSERTS)conditional guard around#include "vigil/assert.h"inlog_system.h - Prevent compilation errors in
Releasebuilds caused by missing assertion macros required by the logging system logic
- Remove the
-
Correct VIGIL_API placement and sink type consistency in LoggerImpl (a5f630a)
🚜 Refactor
-
Decouple SourceLocation from std::source_location alias in C++20 (54d2aef)
-
Encapsulate LoggerImpl members and add public accessors (4fa69b6)
- Make
m_Logger,m_ConsoleSink, andm_FileSinkprivate insideLoggerImplto improve data hiding - Expose controlled getter methods (
SpdLogger(),FileSink(),ConsoleSink(), andName()) - Add
AttachSink()method toLoggerImplfor white-box testing support
- Make
🛠️ Build System
-
Optimize CMake configuration structure and option management (84ed135)
- Clean up option alignments and default values for scoped logging and build flags.
- Reorganize module inclusion paths, target grouping, and output directory layouts.
-
Enhance compiler options and optimize dead-code stripping (2e4234a)
- Add MSVC multi-processor compilation (/MP) flag to accelerate builds.
- Implement cross-platform dead-code stripping via compile and link options for GCC, Clang, and MSVC.
- Scope _FORTIFY_SOURCE=2 strictly to Release builds under GCC and Clang.
- Restructure compiler options using generator expressions.
-
Correct C++ standard target for example executables to C++20 (7894d54)
🔧 Maintenance
-
Ensure complete test and example coverage in CI (dc01926)
-
Update git-cliff action version and adjust release name format (9839540)
-
Update workflow to trigger on workflow_dispatch and improve version handling (796ea20)
- Improve
cliff.tomlconfiguration
- Improve
-
Expand and improve test suite for assertions, async, hooks, and registry (22a64c0)
- Add test for
VIGIL_VERIFY,VIGIL_ASSERT, and related pointer/range validation macros - Introduce robust asynchronous logging tests verifying delivery guarantees and configuration overrides
- Implement dedicated unit tests for all event hooks (
OnMessage,OnLevelChange,OnFlush,OnShutdown) - Improve test helpers with
UniqueLogPath()to guarantee test isolation and prevent file collisions
- Add test for
Full Changelog: v0.5.1...v0.6.0-WIP
v0.5.1
🚀 Features
-
Organize header files into source groups and add MSVC preprocessor as INTERFACE option (f9d0c44)
-
Dynamic version loading from
VERSIONfile (322e48b)- Read raw and plain project version from a root
VERSIONfile - Expose
VIGIL_VERSION_FULLandVIGIL_IS_PRERELEASEin CMake andversion.h - Add C language support to project definition
- Configure
CMAKE_CONFIGURE_DEPENDSto trigger re-configure onVERSIONchange
- Read raw and plain project version from a root
🔧 Maintenance
-
Add pull request template and automated prerelease workflow (85734d4)
- Add
.github/PULL_REQUEST_TEMPLATE.mdto guide community contributions - Add
.github/workflows/pre-release.ymlto generate changelogs viagit-cliffand publish GitHub prereleases onv*-WIPandv*-devtags - Update
VERSIONformat to0.5.1.WIP
- Add
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Vigil v0.5.0
Key Highlights
- Lifecycle Hooks and Event System: Added
LogHooksandHooksRegistryfor thread-safe event listening (messages, level shifts, flush actions) with deadlock-safe callback dispatching. - Extended Scope Control: Introduced manual block-scoping macros (
VIGIL_SCOPE_BEGIN/VIGIL_SCOPE_END) and explicit log-level overrides forScopedLogger. - Configurable Output Directories: Integrated explicit
LogDirproperties across configurations with automatic directory resolution usingstd::filesystem. - Cross-Platform Debugger Utilities: Added
IsDebuggerAttached()and conditional breakpoint macroVIGIL_DEBUGBREAK_IF_ATTACHED()across Windows, Linux, and macOS. - Unified Stack Traces: Consolidated platform backends with inline frame expansion via
DbgHelp(Windows) andlibbacktrace(POSIX), along with cleaned demangled symbol formatting.
Core Improvements
- Safety Assertions: Added
LogSysteminitialization checks for debug builds and automatic instantiation for non-existent named loggers inVIGIL_LOG_NAMED. - Path Normalization: Standardized path separators to ensure consistent cross-platform location formatting.
- Modular Refactoring: Reorganized example suites (
logger_example,scoped_example,assert_example) into isolated demo functions with streamlined CLI argument dispatching. - Build System Updates: Unified internal headers, removed obsolete header files, added the
hooks_exampletarget, and ensured C++23 standard compliance.
Full Changelog: v0.4.1...v0.5.0
v0.4.1
Vigil v0.4.1
This release fixes a critical assertion formatting bug for C++17 builds, corrects expression stringification in VERIFY, and introduces a unified warning control system alongside cleaner CMake integration.
Key Highlights:
- C++17 Stability: Fixes a compilation issue with
fmt::formatcaused by empty variadic macro expansions. - Portable Warning API: Introduces internal macros to handle compiler diagnostic pragmas across MSVC, Clang, and GCC without cluttering headers with raw
#pragmadirectives. - Build System Improvements: Adopts CMake 3.24+ native
COMPILE_WARNING_AS_ERRORproperties and removes unnecessary DLL symbol exports on header-only/RAII types.
🐛 Bug Fixes
- Resolve C++17 variadic pack and VERIFY stringify issues in Assert.h (
d5e24dc)- In C++17,
VIGIL_ASSERTexpanded into ill-formedfmt::format()calls when passed an empty__VA_ARGS__pack in certainfmtversions. VIGIL_VERIFYchained throughVIGIL_ASSERT, causingVIGIL_STRINGIFYto output double-parenthesized expressions like(expr)instead ofexpr.- Added
VIGIL_INTERNAL_ASSERT_IMPL_NO_MSGfor C++17 no-message paths to invoke assertion failure reporting directly. - C++20 behavior remains unaffected as
__VA_OPT__handles empty packs cleanly.
- In C++17,
- Improve early return logging in DemoEarlyReturn function (
352200e)
🚜 Refactor
- Remove VIGIL_API export macro from ScopedLogger (
d9a3d13)- Prevents MSVC C4251 warnings caused by exporting STL members across DLL boundaries.
ScopedLoggeris fully inline/RAII and does not require DLL export annotations.
- Prevents MSVC C4251 warnings caused by exporting STL members across DLL boundaries.
- Add portable warning control macros in
compiler_attributes.h(4adb8db)- Replaces raw
#pragmablocks with a unified suppression API (VIGIL_PRAGMA_PUSH_WARNING,VIGIL_DISABLE_WARNING_*, etc.), migratinglog_level.has the first consumer.
- Replaces raw
- Remove compiler-specific diagnostic pragmas from logger_impl.h (
f4c9614)
🛠️ Build System
- Fix warning policy propagation and adopt native warning-as-error (
6242fd9)- Replaces hardcoded compiler flags (
/WX,-Werror) with CMake 3.24+COMPILE_WARNING_AS_ERRORproperties. - Enables
-Wdocumentationdiagnostics for Clang toolchains.
- Replaces hardcoded compiler flags (
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Vigil v0.4.0
Vigil v0.4.0 brings explicit, formatted assertion macros, cleaner preprocessor architectures, compiler warning suppressions, and streamlined build configurations for cross-platform integration.
🚀 Features
- Assertion API Enhancement (
115c9dc)- Added explicit
VIGIL_ASSERT_MSGandVIGIL_VERIFY_MSGmacros supportingfmt-style runtime context. - Corrected C++17 variadic macro expansion when forwarding string views to
ReportAssertFailure. - Updated reference examples in
assert_example.cpp.
- Added explicit
- Repository Health & Community Guidelines
🐛 Bug Fixes
- Centralized Log-Level Gating (
bffcf1b)- Updated
VIGIL_LOG_NAMEDto evaluateIsLevelActiveinstead of raw level comparisons. - Suppressed
-Wtype-limitsandC4296warnings when checking log levels against compile-time thresholds.
- Updated
- Log Level Cast Alignment (
8663bab)- Explicitly cast
VIGIL_ACTIVE_LOG_LEVELtouint8_tinsideIsLevelActive.
- Explicitly cast
🚜 Refactoring & Architecture
- Preprocessor & Scoped Logger Cleanup (
fa5b263)- Moved
VIGIL_CURRENT_FUNCTIONtocompiler_attributes.h. - Relocated preprocessor concatenation (
VIGIL_CONCAT) topreprocessor_utils.h. - Replaced ad-hoc
VIGIL_FUNC_SIGusages with standard attribute helpers.
- Moved
- Symbol Visibility & Target Cleanups (
c87ccbe)- Confined
-fvisibilityflags directly to the corevigiltarget configuration. - Removed redundant global
POSITION_INDEPENDENT_CODEproperty specifications.
- Confined
🛠️ Build System & Maintenance
libbacktraceOutput Control: Silenced normal configure output for vendoredlibbacktracewhile preserving logging on failure (ebc049e).- Funding: Added
Full Changelog: v0.3.1...v0.4.0
v0.3.1
Installation and packaging
Fixed
- Fixed installation and downstream linking when stack trace support is enabled on POSIX platforms.
- Fixed packaging of the vendored
libbacktracedependency. - Fixed the generated CMake package configuration to correctly locate the installed
libbacktracelibrary.
Build
- Improved the integration of the vendored
libbacktracedependency with the installation and packaging system. - Reduced
libbacktracebuild output by enabling ExternalProject logging.
Full Changelog: v0.3.0...v0.3.1