Index

lognestmonster / 9974d1c

A general-purpose single-header C logging library and parser for event-based logs. (Incomplete)

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
18401 Feb 2020 22:06e60fb20Update README.mdJosh Stockin114G

Blob @ lognestmonster / README.md

text/plain3673 bytesdownload raw
1<p align="center" id="lnm">
2 <img src="/static/logobanner.png"/>
3</p>
4<p align="center">
5 <i><b>(WIP)</b> A lightweight C logging library and parser for event-oriented logs.</i>
6</p>
7<p align="center">
8 <a href="https://github.com/JoshuaS3/lognestmonster/blob/dev/LICENSE">
9 <img src="https://img.shields.io/github/license/joshuas3/lognestmonster?style=flat-square"/>
10 </a>
11 <a href="https://github.com/JoshuaS3/lognestmonster/tree/dev">
12 <img src="https://img.shields.io/badge/version-(WIP) 0.3.0-informational?style=flat-square"/>
13 </a>
14 <a href="https://github.com/JoshuaS3/lognestmonster/blob/dev/src/c/lognestmonster.h">
15 <img src="https://img.shields.io/github/size/joshuas3/lognestmonster/src/c/lognestmonster.h?label=header%20size&style=flat-square"/>
16 </a>
17 <a href="https://app.codacy.com/manual/JoshuaS3/lognestmonster/dashboard">
18 <img src="https://img.shields.io/codacy/grade/15048b0c7728497394651e295d61746b/dev?logo=codacy&style=flat-square"/>
19 </a>
20 <a href="https://github.com/JoshuaS3/lognestmonster/actions">
21 <img src="https://img.shields.io/github/workflow/status/JoshuaS3/lognestmonster/C Header Unit Tests?label=Unit%20Test%20Chain&logo=github&style=flat-square"/>
22 </a>
23<p>
24
25Lognestmonster is a general-purpose single-header C logging library that
26pertains a number of features:
27
28* Nested/layer-based logging capabilities
29* Event-oriented log compilation
30* Multiple queues or outputs
31* Full developer customizability on memory allocation
32 * Preprocessor handles to incorporate non-standard memory functions
33* Full developer customizability on I/O redirection
34 * Generic filesystem log output
35 * End-to-end `stdout` and `stdin` piping, allowing data transfer over serial,
36 socket, or anything else
37* A binary format lighter than plaintext
38* A feature-packed but comprehensive standalone deserializer/parser
39 * Interactive textual UI (ncurses)
40 * Logtree filtering/sorting and navigation
41 * Data operations such as binary to plaintext conversions and custom hooks on
42 user-defined events
43 * Optional daemon for hook events
44 * Full developer customizability on data display, program controls, and hook
45 operations
46
47_**(WIP)** Not yet meant for development or production use_
48
49## Performance at Different Optimization Levels
50
51Output of `./test performance` as of commit `b54160c`:
52
53Optimization Level | Header Binary Size\* (in bytes) | Unit Test Runtime\*\* (in µs)
54------------------ | ------------------------------- | -----------------------------
55-O0 | 22552 | 70
56-O1 | 18424 | 67
57-O2 | 22520 | 69
58-O3 | 26760 | 68
59-Os | 18424 | 69
60
61\*Header binary size is measured by compilation of the following source file:
62
63```c
64// tests/header_only.c
65#define LNM_INIT
66#include "lognestmonster.h"
67
68int main(void) {
69 return 0;
70}
71```
72
73\*\*Median taken from 200 trials run in sequence to account for variable processor
74conditions and behaviors. Run on a mid-tier 3.3GHz processor (i5-4590). Runtime
75is measured by the execution and output of [the header's unit
76test](tests/header_unit.c).
77
78## Copyright
79
80This package is copyrighted by [Joshua 'joshuas3'
81Stockin](https://joshstock.in/) and licensed under the [MIT License](LICENSE).
82
83A form of the following should be present in each major library source or header
84file.
85
86```txt
87lognestmonster Copyright (c) 2020 Joshua 'joshuas3' Stockin
88<https://joshstock.in>
89<https://github.com/JoshuaS3/lognestmonster>
90This software is licensed under the MIT License.
91```
92