{"repo":"briandowns/liblogger","free":true,"listed":false,"github":"https://github.com/briandowns/liblogger","clone":"git clone https://github.com/briandowns/liblogger.git","description":"A simple and performant, single-header JSON structured logger for C applications.","language":"C","stars":19,"topics":["logging","logger","structured-logging","c","json","json-logger"],"license":"BSD-2-Clause","category":"analytics","readme_excerpt":"liblogger liblogger is a structured logger for C/C++. The output format is JSON. liblogger supports writing to stdout, stderr, and to a file. Usage To use this library, initialize the logger with s log init() and call the s log macro. The latter macro takes a log level, any number of s log field t pointers containing a string key and a log value. The supported int values are: int , int8 , int16 , int32 , int64 The supported uint values are: uint , uint8 , uint16 , uint32 , uint64 And float , double , and string . The supported log levels are: trace , debug , info , warn , error , fatal , For a successful log entry to be made, a key and a value need to be provided. If no value is provided, that field will not be logged. Memory is freed after the log entry is written. Example Build the example: Expected output: Write to a log file: Requirements / Dependencies jansson A lot of thanks to Ayan George for the help with getting this where it is. Contact Brian Downs @bdowns328 License BSD 2 Clause License.","default_branch":null,"files":null,"tree":[],"storefront":"/r/briandowns","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/briandowns/liblogger/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."}