2022-02-27 20:45:41 -08:00
|
|
|
# Introduction
|
|
|
|
|
- *alog* or *a logger* is a lightweight, portable logger written in C.
|
|
|
|
|
- It is entirely unremarkable
|
2022-02-28 01:09:33 -08:00
|
|
|
- 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)
|
2022-02-27 20:45:41 -08:00
|
|
|
|
|
|
|
|
# How to build
|
|
|
|
|
```bash
|
2022-03-07 11:40:22 -08:00
|
|
|
$ make alog-so
|
2022-02-27 20:45:41 -08:00
|
|
|
```
|
|
|
|
|
|
2022-02-28 01:09:33 -08:00
|
|
|
# How to test
|
|
|
|
|
```
|
2022-03-07 11:40:22 -08:00
|
|
|
$ make alog-tests
|
|
|
|
|
```
|
2022-02-28 01:09:33 -08:00
|
|
|
|
2022-02-27 20:45:41 -08:00
|
|
|
# Variables
|
2022-03-07 11:40:22 -08:00
|
|
|
The following (shell) variables can be set at compile time:
|
2022-02-27 20:45:41 -08:00
|
|
|
|
|
|
|
|
- **ALOG_DEBUG**: Set this variable to compile with debug symbols
|
|
|
|
|
- **ALOG_HIJACK_PRINTF**: Set this variable to compile along with a printf implementation that leverages alog. Probably dont though.
|