{"id":16556997,"url":"https://github.com/yimura/asynclogger","last_synced_at":"2025-10-28T20:30:47.901Z","repository":{"id":119796356,"uuid":"588948127","full_name":"Yimura/AsyncLogger","owner":"Yimura","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-24T12:41:06.000Z","size":30,"stargazers_count":8,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T19:57:50.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yimura.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}},"created_at":"2023-01-14T15:19:06.000Z","updated_at":"2025-01-23T08:41:55.000Z","dependencies_parsed_at":"2024-06-24T14:26:03.646Z","dependency_job_id":null,"html_url":"https://github.com/Yimura/AsyncLogger","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FAsyncLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FAsyncLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FAsyncLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FAsyncLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yimura","download_url":"https://codeload.github.com/Yimura/AsyncLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238710681,"owners_count":19517747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T20:06:16.224Z","updated_at":"2025-10-28T20:30:47.530Z","avatar_url":"https://github.com/Yimura.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncLogger\n\nModern Asyncronous Logger using C++20 and [std::format](https://en.cppreference.com/w/cpp/utility/format/format) (falls back on [fmt::format](https://github.com/fmtlib/fmt) if not available) without using macro's!\nUses [std::source_location](https://en.cppreference.com/w/cpp/utility/source_location) to get the location where a log was made.\n\n## CMake variables\n\n - `USE_FMT` : Force AsyncLogger to use fmt formatting instead of std formatting if it's available.\n\n## How to use\n\nVery simple example application showing how to implement it.\n\nmain.cpp\n```cpp\n#include \"AsyncLogger/Logger.hpp\"\n#include \u003cfilesystem\u003e\n#include \u003ciostream\u003e\n\n// expose LOG, LOGF, eLogLevel::DEBUG, eLogLevel::INFO, etc...\nusing namespace al;\n\nvoid COUT_LOG(LogMessagePtr msg)\n{\n    const auto\u0026 location = msg-\u003eLocation();\n    const auto file = std::filesystem::path(msg-\u003eLocation().file_name()).filename().string();\n\n    std::cout \u003c\u003c \"[\" \u003c\u003c file \u003c\u003c \":\" \u003c\u003c location.line() \u003c\u003c \"] \" \u003c\u003c msg-\u003eMessage();\n}\n\nint main()\n{\n    Logger::Init();\n    Logger::AddSink(COUT_LOG);\n\n    LOG(INFO) \u003c\u003c \"Test \" \u003c\u003c 1 \u003c\u003c 2 \u003c\u003c 3 \u003c\u003c \" some float (\" \u003c\u003c 3.5f \u003c\u003c \")\";\n\n    Logger::Destroy();\n\n    return 0;\n}\n```\nLogs the following output:\n```\n[main.cpp:20] Test 123 some float (3.5)\n```\n\nCMakeLists.txt\n```cmake\ncmake_minimum_required(VERSION 3.20)\nset(CMAKE_CXX_STANDARD 20 GLOBAL)\n\nproject(my_app LANGUAGES CXX VERSION 0.0.1)\n\nadd_subdirectory(AsyncLogger)\nadd_executable(${PROJECT_NAME} src/main.cpp)\ntarget_link_libraries(${PROJECT_NAME} AsyncLogger)\n```\n\nCMakeLists.txt using FetchContent\n```cmake\ncmake_minimum_required(VERSION 3.20)\nset(CMAKE_CXX_STANDARD 20 GLOBAL)\n\nproject(my_app LANGUAGES CXX VERSION 0.0.1)\n\ninclude(FetchContent)\nFetchContent_Declare(\n    AsyncLogger\n    GIT_REPOSITORY https://github.com/Yimura/AsyncLogger.git\n    GIT_TAG master\n    GIT_PROGRESS TRUE\n)\nFetchContent_MakeAvailable(AsyncLogger)\n\nadd_executable(${PROJECT_NAME} src/main.cpp)\ntarget_link_libraries(${PROJECT_NAME} AsyncLogger)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyimura%2Fasynclogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyimura%2Fasynclogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyimura%2Fasynclogger/lists"}