add rudimentary unit tests, and logging timestamps

Signed-off-by: Aidan Hahn <aidan@aidanis.online>
This commit is contained in:
Aidan Hahn 2022-02-28 01:09:33 -08:00
parent 7fafcd344d
commit 1e9b701542
No known key found for this signature in database
GPG key ID: 327711E983899316
6 changed files with 188 additions and 37 deletions

View file

@ -1,13 +1,28 @@
# Introduction
- *alog* or *a logger* is a lightweight, portable logger written in C.
- It is entirely unremarkable
- Usage of *alog* is extremely simple. [See the API](alog.h)
- Usage of *alog* is extremely simple.
### What kind of things can I log to?
Anything that is a file descriptor and can be written to with write() and fsync(). This includes the following:
- pipes
- files
- stdout
- stderr
- sockets (untested)
### How do I use this library?
- [See the API](alog.h)
- [See the tests](tests/log_test.c)
# How to build
```bash
$ make so
```
# How to test
```
# Variables
The following (shell) variables can be set to influence behavior at runtime: