{"id":19563613,"url":"https://github.com/akagi201/lwlog","last_synced_at":"2025-04-27T00:32:23.961Z","repository":{"id":20266177,"uuid":"23539202","full_name":"Akagi201/lwlog","owner":"Akagi201","description":"A lightweight header only logging library for C","archived":false,"fork":false,"pushed_at":"2022-01-31T08:52:38.000Z","size":205,"stargazers_count":56,"open_issues_count":0,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T18:52:00.769Z","etag":null,"topics":["c","header-only","lightweight","log","logging"],"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/Akagi201.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}},"created_at":"2014-09-01T10:42:53.000Z","updated_at":"2024-11-30T22:36:41.000Z","dependencies_parsed_at":"2022-08-30T20:11:47.928Z","dependency_job_id":null,"html_url":"https://github.com/Akagi201/lwlog","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/Akagi201%2Flwlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akagi201%2Flwlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akagi201%2Flwlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akagi201%2Flwlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akagi201","download_url":"https://codeload.github.com/Akagi201/lwlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251072280,"owners_count":21532005,"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":["c","header-only","lightweight","log","logging"],"created_at":"2024-11-11T05:18:27.423Z","updated_at":"2025-04-27T00:32:23.615Z","avatar_url":"https://github.com/Akagi201.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"lwlog\n=====\n\n[![Build Status](https://travis-ci.org/Akagi201/lwlog.svg?branch=master)](https://travis-ci.org/Akagi201/lwlog)\n\nA header only, colorful, leveled, macro implemented logging lib for C.\n\n```C\nlwlog_emerg(\"This a emerge log.\");\nlwlog_alert(\"This a alert log.\");\nlwlog_crit(\"This a crit log.\");\nlwlog_err(\"This a err log.\");\nlwlog_warning(\"This a warning log.\");\nlwlog_notice(\"This a notice log.\");\nlwlog_info(\"This a info log.\");\nlwlog_debug(\"This a debug log.\");\n```\n\n![screenshot](https://raw.github.com/Akagi201/lwlog/master/assets/lwlog.png)\n\n## Features\n* Only one header is needed.\n* Colorful output to console.\n* `errno` support.\n* Simple APIs similar to printf().\n* Support different logging levels.\n* Zero performance overhead when logging is disabled.\n* Customizable module name. [TODO]\n* Transparent logging to file/console/network/syslog. [Maybe]\n\n## Install\n\n`clib install Akagi201/lwlog`\n\n## Macro controls\n\n* log level control\n* color control\n\n```C\n#define LOG_COLOR (1) // 0: off, 1: on, default: 1\n#define LOG_LEVEL (7) // -1: off, 0~7: different log levels, default: 7\n\n#include \"lwlog.h\"\n```\n\n## Build \u0026 Test\n\n```C\n$ gcc test.c\n$ ./a.out\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakagi201%2Flwlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakagi201%2Flwlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakagi201%2Flwlog/lists"}