{"repo":"JeepWay/logger-c","free":true,"listed":false,"github":"https://github.com/JeepWay/logger-c","clone":"git clone https://github.com/JeepWay/logger-c.git","description":"A lightweight, flexible logger library for C language","language":"C","stars":25,"topics":["c","c-language","logger","logging"],"license":"MIT","category":"analytics","readme_excerpt":"Logger C A lightweight, flexible logger library for the C language, refactored from log.c project and inspired from Python's logging package. This library provides a simple yet powerful way to log messages with different levels, handlers, and formatting options. It supports both stream and file handlers, and customizable log formats. Features - Multiple log levels: TRACE , DEBUG , INFO , WARN , ERROR , FATAL . - Zero-Config Initialization : Uses attribute ((constructor)) for automatic root handler setup, ensuring the logger is ready before using. - Independent Handler Settings : Each handler can be individually set to quiet mode. - Highly customizable ability : Handlers can be independently configured for easily assigned specific date and text formats. Simple Usage 1. Clone or download the repository: 2. Include the header file logger.h and source file logger.c in your project. The following is an example (main.c): 3. Compile your program with a C compiler (e.g., gcc), and execute it. 4. You will see the similar result in the console like the top picture. Basic Usage The following DEFAULT values are defined in logger.h. You can use them to set the default values for convenience, or you can specify your own values. 1. Change default log level The default log level of root handler is TRACE . You can change the log level by using log set level(char name, size t value) , where name is the handler name and value is the log level. 2. Add a file handler The default setting only cont","default_branch":null,"files":null,"tree":[],"storefront":"/r/JeepWay","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JeepWay/logger-c/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}