Index

lognestmonster / b7d72fe

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

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
18001 Feb 2020 21:55e4a4281Add performance section to README.mdJosh Stockin1290G

Blob @ lognestmonster / README.md

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