{"id":46016725,"url":"https://github.com/vertexnova/vnelogging","last_synced_at":"2026-05-03T02:03:10.779Z","repository":{"id":334575959,"uuid":"1140291363","full_name":"vertexnova/vnelogging","owner":"vertexnova","description":"Vertexnova Logging (vnelogging) is a lightweight, thread-safe logging library designed for high-performance C++ applications.","archived":false,"fork":false,"pushed_at":"2026-02-13T05:19:55.000Z","size":3758,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T10:58:04.007Z","etag":null,"topics":["cpp","logging-library","rendering-engine"],"latest_commit_sha":null,"homepage":"https://learnvertexnova.com/docs/docs/learn/adding-logging","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vertexnova.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T04:33:31.000Z","updated_at":"2026-02-13T05:19:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vertexnova/vnelogging","commit_stats":null,"previous_names":["vertexnova/vnelogging"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vertexnova/vnelogging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexnova%2Fvnelogging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexnova%2Fvnelogging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexnova%2Fvnelogging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexnova%2Fvnelogging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vertexnova","download_url":"https://codeload.github.com/vertexnova/vnelogging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexnova%2Fvnelogging/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29957186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","logging-library","rendering-engine"],"created_at":"2026-03-01T01:22:53.014Z","updated_at":"2026-05-03T02:03:10.756Z","avatar_url":"https://github.com/vertexnova.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"icons/vertexnova_logo_medallion_with_text.svg\" alt=\"VertexNova Logging\" width=\"320\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA modern, high-performance C++ logging library\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/vertexnova/vnelogging/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/vertexnova/vnelogging/actions/workflows/ci.yml/badge.svg?branch=main\" alt=\"CI\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/vertexnova/vnelogging\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/vertexnova/vnelogging/branch/main/graph/badge.svg\" alt=\"Coverage\"/\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-17%2F20-blue.svg\" alt=\"C++ Standard\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0-green.svg\" alt=\"License\"/\u003e\n\u003c/p\u003e\n\n---\n\n## About\n\n**vnelogging** is a lightweight, thread-safe logging library designed for high-performance C++ applications. It provides both synchronous and asynchronous logging modes, multiple output sinks, and a clean stream-based API.\n\nThis library is the **first component** of [VertexNova](https://github.com/vertexnova) — a multi-backend game/graphics engine I'm building from scratch. The logging system needed to be fast, flexible, and production-ready before building the rest of the engine on top of it.\n\n## Features\n\n- **Dual Logging Modes**: Synchronous for debugging, asynchronous for production\n- **Multiple Sinks**: Console (with colors) and file output\n- **Thread-Safe**: Safe concurrent logging from multiple threads\n- **Stream API**: Familiar `\u003c\u003c` operator for composing messages\n- **Customizable Patterns**: Configure timestamp, level, thread ID, and more\n- **Multiple Loggers**: Create separate loggers for different subsystems\n- **Cross-Platform**: Linux, macOS, and Windows support\n- **Header-Only Option**: Easy integration into existing projects\n\n## Installation\n\n### Option 1: Git Submodule (Recommended)\n\n```bash\n# Add as submodule\ngit submodule add https://github.com/vertexnova/vnelogging.git external/vnelogging\n\n# In your CMakeLists.txt\nadd_subdirectory(external/vnelogging)\ntarget_link_libraries(your_target PRIVATE vne::logging)\n```\n\n### Option 2: FetchContent\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(\n    vnelogging\n    GIT_REPOSITORY https://github.com/vertexnova/vnelogging.git\n    GIT_TAG main\n)\nFetchContent_MakeAvailable(vnelogging)\ntarget_link_libraries(your_target PRIVATE vne::logging)\n```\n\n### Option 3: System Install\n\n```bash\ngit clone --recursive https://github.com/vertexnova/vnelogging.git\ncd vnelogging\ncmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local\ncmake --build build\nsudo cmake --install build\n\n# In your CMakeLists.txt\nfind_package(VneLogging REQUIRED)\ntarget_link_libraries(your_target PRIVATE vne::logging)\n```\n\n## Building\n\n```bash\ngit clone --recursive https://github.com/vertexnova/vnelogging.git\ncd vnelogging\ncmake -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n```\n\n### CMake Options\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `BUILD_TESTS` | `ON` | Build unit tests |\n| `BUILD_EXAMPLES` | `OFF` | Build example applications |\n| `ENABLE_COVERAGE` | `OFF` | Enable code coverage (Debug only) |\n\n## Quick Start\n\n```cpp\n#include \u003cvertexnova/logging/logging.h\u003e\n\nnamespace {\nCREATE_VNE_LOGGER_CATEGORY(\"app\")\n}  // namespace\n\nint main() {\n    // Configure logger\n    vne::log::LoggerConfig config;\n    config.name = vne::log::kDefaultLoggerName;\n    config.sink = vne::log::LogSinkType::eBoth;\n    config.file_path = \"app.log\";\n    config.log_level = vne::log::LogLevel::eDebug;\n    \n    vne::log::Logging::configureLogger(config);\n    \n    // Log messages\n    VNE_LOG_INFO \u003c\u003c \"Application started\";\n    VNE_LOG_DEBUG \u003c\u003c \"Processing \" \u003c\u003c item_count \u003c\u003c \" items\";\n    VNE_LOG_ERROR \u003c\u003c \"Failed to load: \" \u003c\u003c filename;\n    \n    vne::log::Logging::shutdown();\n    return 0;\n}\n```\n\n## Examples\n\n| Example | Description |\n|---------|-------------|\n| [01_hello_logging](examples/01_hello_logging) | Getting started with basic logging |\n| [02_subsystem_logging](examples/02_subsystem_logging) | Multiple loggers for different subsystems |\n| [03_spdlog_integration](examples/03_spdlog_integration) | Using vnelogging alongside spdlog |\n| [04_benchmark](examples/04_benchmark) | Performance comparison: sync vs async |\n| [05_multithreaded](examples/05_multithreaded) | Thread-safe logging from concurrent threads |\n\nBuild examples with:\n\n```bash\ncmake -B build -DBUILD_EXAMPLES=ON\ncmake --build build\n./build/bin/01_HelloLogging\n```\n\n## Performance\n\nBenchmarked on Apple M3 Pro (Release build):\n\n| Mode | Throughput | Latency |\n|------|------------|---------|\n| Synchronous | ~500K logs/sec | ~2 μs/log |\n| Asynchronous | ~1.2M logs/sec | ~0.8 μs/log |\n\n## API Design\n\nThe library follows modern C++ design principles:\n\n- **RAII**: Automatic resource management via `LogStream` destructor\n- **Interface Segregation**: `ILogger` and `ILogSink` abstract interfaces\n- **Composition**: Loggers compose sinks, not inherit from them\n- **Thread Safety**: All public APIs are thread-safe by default\n\n### Macro-Based API\n\n```cpp\nVNE_LOG_INFO \u003c\u003c \"Message\";           // Default logger\nVNE_LOG_DEBUG_L(\"physics\") \u003c\u003c \"Msg\"; // Named logger\n```\n\n### Programmatic API\n\n```cpp\nvne::log::Logging::configureLogger(config);\nvne::log::Logging::setLogLevel(\"physics\", LogLevel::eDebug);\nauto logger = vne::log::Logging::getLogger(\"physics\");\n```\n\n## Library Type\n\nThe library builds as a **static library** by default (`libvnelogging.a` / `vnelogging.lib`).\n\n| Platform | Library File |\n|----------|--------------|\n| Linux/macOS | `lib/libvnelogging.a` |\n| Windows | `lib/vnelogging.lib` |\n\n### Why Static?\n\n- **Zero runtime dependencies**: Single binary deployment\n- **Link-time optimization**: Better inlining and dead code elimination\n- **Simpler deployment**: No DLL/SO versioning issues\n- **Game engine use case**: Typically statically linked for performance\n\n## Documentation\n\n- [Wiki](https://github.com/vertexnova/vnelogging/wiki) — User guide, quick start, API reference\n- [API Documentation](docs/README.md) — Generated with Doxygen\n- [Architecture](docs/vertexnova/logging/logging.md) — Design and components\n- [Coding Guidelines](CODING_GUIDELINES.md) — Project conventions\n\n## Platform Support\n\n| Platform | Status | Notes |\n|----------|--------|-------|\n| Linux | Tested | GCC 9+, Clang 10+ |\n| macOS | Tested | Xcode 12+, Apple Clang |\n| Windows | Tested | MSVC 2019+, MinGW |\n| iOS | Supported | Xcode toolchain |\n| Android | Supported | NDK r21+ |\n| Web | Supported | Emscripten |\n\n**Note on Console Colors:** ANSI color codes are enabled by default. Some terminals (like Xcode debugger) may display raw escape codes. To disable colors:\n```cpp\nvne::log::setColorEnabled(false);  // Programmatic\n```\nOr set the `NO_COLOR` environment variable.\n\n## Requirements\n\n- C++17 or later (C++20 preferred)\n- CMake 3.16+\n- Compiler: GCC 9+, Clang 10+, MSVC 2019+\n\n## License\n\nApache License 2.0 — See [LICENSE](LICENSE) for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  Part of the \u003ca href=\"https://github.com/vertexnova\"\u003eVertexNova\u003c/a\u003e project\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvertexnova%2Fvnelogging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvertexnova%2Fvnelogging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvertexnova%2Fvnelogging/lists"}