{"id":18290564,"url":"https://github.com/shuai132/log","last_synced_at":"2026-03-16T00:37:03.493Z","repository":{"id":124277242,"uuid":"200341674","full_name":"shuai132/log","owner":"shuai132","description":"a simple printf wrapper for c/c++","archived":false,"fork":false,"pushed_at":"2025-03-07T11:31:09.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T02:41:30.833Z","etag":null,"topics":["log","logger","logging","printf"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuai132.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-08-03T06:38:47.000Z","updated_at":"2025-03-07T11:31:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"87a18c12-7cd1-41d6-8a86-bd19ee7ca694","html_url":"https://github.com/shuai132/log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuai132","download_url":"https://codeload.github.com/shuai132/log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324371,"owners_count":20920629,"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":["log","logger","logging","printf"],"created_at":"2024-11-05T14:11:27.310Z","updated_at":"2025-10-26T15:36:33.634Z","avatar_url":"https://github.com/shuai132.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log\n\n[![Build Status](https://github.com/shuai132/LOG/workflows/CI/badge.svg)](https://github.com/shuai132/LOG/actions?workflow=CI)\n\nlog for C/C++ project, by wrapper and enhance `printf`.\n\n## Features\n\n* One header file\n* Colors on Unix\n* Print filename and lines automatically\n* Line feed with `\\n`, or `\\r\\n` with `L_O_G_LINE_END_CRLF`\n* Ignores `LOGD` in release mode\n* Support thread safe and thread id\n* Support DateTime\n\n## Usage\n\n[example](example.cpp)\n\n```c++\n#include \"log.h\"\n\nint main() {\n  LOG(\"log\");\n  LOGT(\"T\", \"msg with tag\");\n  LOGD(\"debug\");\n  LOGI(\"info\");\n  LOGW(\"warn\");\n  LOGE(\"error\");\n  LOGF(\"fatal\");\n  [] { LOGE(\"in lambda\"); }();\n  return 0;\n}\n```\n\nOutput:\n\n```text\n2023-09-14 23:32:23.197 229765 [*]: example.cpp:4 log\n2023-09-14 23:32:23.198 229765 [T]: example.cpp:5 msg with tag\n2023-09-14 23:32:23.198 229765 [D]: example.cpp:6 debug\n2023-09-14 23:32:23.198 229765 [I]: example.cpp:7 info\n2023-09-14 23:32:23.198 229765 [W]: example.cpp:8 [main] warn\n2023-09-14 23:32:23.198 229765 [E]: example.cpp:9 [main] error\n2023-09-14 23:32:23.198 229765 [!]: example.cpp:10 [main] fatal\n2023-09-14 23:32:23.198 229765 [V]: example.cpp:11 verbose\n2023-09-14 23:32:23.198 229765 [E]: example.cpp:12 [operator()] in lambda\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuai132%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuai132%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuai132%2Flog/lists"}