Skip to content

Releases: DMsuDev/vigil

v0.7.0

Choose a tag to compare

@DMsuDev DMsuDev released this 24 Sep 16:39
v0.7.0
a560761

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

v0.7.0-WIP Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 24 Sep 16:27
f63a35d

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_TESTS in CI configure presets.
    • Specify Debug configuration for the windows-dev test preset.

🔧 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/crash to validate Vigil's
    crash handling infrastructure against real runtime faults.

    Key changes:

    • Option Flag: Introduce VIGIL_CRASH_TESTS option in the main CMake build.
    • Standalone Consumer: Build an isolated consumer executable using CTest's
      --build-and-test mechanism.
    • Trigger Coverage: Register individual tests for SIGSEGV, SIGABRT, SIGFPE, SIGILL,
      std::terminate, bad_alloc, pure virtual calls, and OS-specific fault triggers.
  • Restructure integration workflow to include crash tests (e58d243)

    Rename install-tests.yml to integration.yml and update the README badge to reflect the broader test scope.

    • Consolidate consumer tests into a single consumer job.
    • Add a dedicated crash job to run the VIGIL_CRASH_TESTS suite.
    • Standardize CMake variables and CTest labels across platforms.

Full Changelog: v0.6.1...v0.7.0-WIP

v0.6.1

Choose a tag to compare

@DMsuDev DMsuDev released this 10 Sep 19:35
v0.6.1
7118ce2

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_view to eliminate unnecessary allocations, added adaptive time formatting ($\mu s$ vs. $ms$), and guaranteed noexcept safety during destruction.
  • Refined API & Docs: Added ToString() for LogLevel enums and expanded Doxygen coverage across core and logging headers.
  • Organized Build System: Restructured example targets into logging/ and diagnostics/ categories, featuring a redesigned vigil_add_example CMake helper for cleaner IDE integration.

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@DMsuDev DMsuDev released this 08 Sep 01:49
9450db9

🚀 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.

  1. VIGIL_LOG_ Prefix for Logging Macros: Convenience macros now explicitly use the VIGIL_LOG_ prefix.
  2. Standardized Severity Level Constants: Preprocessor constants changed from VIGIL_LOG_LEVEL_* to VIGIL_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: LogConfig now supports individual Async enabling and AsyncQueueSize overrides per logger instance.
  • Lazy Thread Pool Initialization: Global spdlog thread pool setup is now deferred via EnsureAsyncThreadPool.

🧪 Integration Testing & Quality

  • Consumer Integration Test Suite (VIGIL_CONSUMER_TESTS): Added ctest --build-and-test harnesses covering all supported integration patterns:

    • Direct vendoring via add_subdirectory().
    • External fetch via FetchContent.
    • System package consumption via find_package(Vigil CONFIG).
  • 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 fmt usage validation whenever installation targets are enabled.

🐛 Bug Fixes

  • Removed the conditional guard around vigil/assert.h in log_system.h to prevent Release build compilation errors.
  • Added missing debugger.h to the installed header set (VIGIL_INTERNAL_HEADERS).
  • Fixed all option() defaults being evaluated before project(), causing incorrect values when consumed as a subproject via add_subdirectory.

New Contributors


Full Changelog: v0.5.1...v0.6.0

v0.6.0-WIP

v0.6.0-WIP Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Sep 00:53
82893b0

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 constexpr for 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 LazyFileSink to defer physical file creation until the first log message is written
    • Extend LogConfig with optional Async and AsyncQueueSize overrides for individual loggers
    • Implement lazy initialization of the global spdlog thread pool via EnsureAsyncThreadPool
    • Standardize pointer allocations across the logging subsystem using custom SmartPointers utilities

🐛 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" in log_system.h
    • Prevent compilation errors in Release builds caused by missing assertion macros required by the logging system logic
  • 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, and m_FileSink private inside LoggerImpl to improve data hiding
    • Expose controlled getter methods (SpdLogger(), FileSink(), ConsoleSink(), and Name())
    • Add AttachSink() method to LoggerImpl for white-box testing support

🛠️ 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.toml configuration
  • 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

Full Changelog: v0.5.1...v0.6.0-WIP

v0.5.1

Choose a tag to compare

@DMsuDev DMsuDev released this 04 Sep 13:03
v0.5.1
00e66e5

🚀 Features

  • Organize header files into source groups and add MSVC preprocessor as INTERFACE option (f9d0c44)

  • Dynamic version loading from VERSION file (322e48b)

    • Read raw and plain project version from a root VERSION file
    • Expose VIGIL_VERSION_FULL and VIGIL_IS_PRERELEASE in CMake and version.h
    • Add C language support to project definition
    • Configure CMAKE_CONFIGURE_DEPENDS to trigger re-configure on VERSION change

🔧 Maintenance

  • Add pull request template and automated prerelease workflow (85734d4)

    • Add .github/PULL_REQUEST_TEMPLATE.md to guide community contributions
    • Add .github/workflows/pre-release.yml to generate changelogs via git-cliff and publish GitHub prereleases on v*-WIP and v*-dev tags
    • Update VERSION format to 0.5.1.WIP

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@DMsuDev DMsuDev released this 31 Aug 00:39
cc288e6

Vigil v0.5.0

Key Highlights

  • Lifecycle Hooks and Event System: Added LogHooks and HooksRegistry for 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 for ScopedLogger.
  • Configurable Output Directories: Integrated explicit LogDir properties across configurations with automatic directory resolution using std::filesystem.
  • Cross-Platform Debugger Utilities: Added IsDebuggerAttached() and conditional breakpoint macro VIGIL_DEBUGBREAK_IF_ATTACHED() across Windows, Linux, and macOS.
  • Unified Stack Traces: Consolidated platform backends with inline frame expansion via DbgHelp (Windows) and libbacktrace (POSIX), along with cleaned demangled symbol formatting.

Core Improvements

  • Safety Assertions: Added LogSystem initialization checks for debug builds and automatic instantiation for non-existent named loggers in VIGIL_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_example target, and ensured C++23 standard compliance.

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@DMsuDev DMsuDev released this 24 Aug 00:26
v0.4.1
19b51d8

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::format caused 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 #pragma directives.
  • Build System Improvements: Adopts CMake 3.24+ native COMPILE_WARNING_AS_ERROR properties 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_ASSERT expanded into ill-formed fmt::format() calls when passed an empty __VA_ARGS__ pack in certain fmt versions.
    • VIGIL_VERIFY chained through VIGIL_ASSERT, causing VIGIL_STRINGIFY to output double-parenthesized expressions like (expr) instead of expr.
    • Added VIGIL_INTERNAL_ASSERT_IMPL_NO_MSG for C++17 no-message paths to invoke assertion failure reporting directly.
    • C++20 behavior remains unaffected as __VA_OPT__ handles empty packs cleanly.
  • 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. ScopedLogger is fully inline/RAII and does not require DLL export annotations.
  • Add portable warning control macros in compiler_attributes.h (4adb8db)
    • Replaces raw #pragma blocks with a unified suppression API (VIGIL_PRAGMA_PUSH_WARNING, VIGIL_DISABLE_WARNING_*, etc.), migrating log_level.h as the first consumer.
  • 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_ERROR properties.
    • Enables -Wdocumentation diagnostics for Clang toolchains.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@DMsuDev DMsuDev released this 22 Aug 00:39
v0.4.0
9de112f

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_MSG and VIGIL_VERIFY_MSG macros supporting fmt-style runtime context.
    • Corrected C++17 variadic macro expansion when forwarding string views to ReportAssertFailure.
    • Updated reference examples in assert_example.cpp.
  • Repository Health & Community Guidelines
    • Added Security Policy (SECURITY.md) and vulnerability reporting guidelines (c7f5a88).
    • Configured Issue Templates for Bug Reports and Feature Requests (372f45e).

🐛 Bug Fixes

  • Centralized Log-Level Gating (bffcf1b)
    • Updated VIGIL_LOG_NAMED to evaluate IsLevelActive instead of raw level comparisons.
    • Suppressed -Wtype-limits and C4296 warnings when checking log levels against compile-time thresholds.
  • Log Level Cast Alignment (8663bab)
    • Explicitly cast VIGIL_ACTIVE_LOG_LEVEL to uint8_t inside IsLevelActive.

🚜 Refactoring & Architecture

  • Preprocessor & Scoped Logger Cleanup (fa5b263)
    • Moved VIGIL_CURRENT_FUNCTION to compiler_attributes.h.
    • Relocated preprocessor concatenation (VIGIL_CONCAT) to preprocessor_utils.h.
    • Replaced ad-hoc VIGIL_FUNC_SIG usages with standard attribute helpers.
  • Symbol Visibility & Target Cleanups (c87ccbe)
    • Confined -fvisibility flags directly to the core vigil target configuration.
    • Removed redundant global POSITION_INDEPENDENT_CODE property specifications.

🛠️ Build System & Maintenance

  • libbacktrace Output Control: Silenced normal configure output for vendored libbacktrace while preserving logging on failure (ebc049e).
  • Funding: Added

Full Changelog: v0.3.1...v0.4.0

v0.3.1

Choose a tag to compare

@DMsuDev DMsuDev released this 11 Aug 13:27
v0.3.1
0e943a0

Installation and packaging

Fixed

  • Fixed installation and downstream linking when stack trace support is enabled on POSIX platforms.
  • Fixed packaging of the vendored libbacktrace dependency.
  • Fixed the generated CMake package configuration to correctly locate the installed libbacktrace library.

Build

  • Improved the integration of the vendored libbacktrace dependency with the installation and packaging system.
  • Reduced libbacktrace build output by enabling ExternalProject logging.

Full Changelog: v0.3.0...v0.3.1