feat: Add first modules

This adds the first modules blocks from the initial proof of concept, with basic docs.
Currently missing is bundling and usage instructions
This commit is contained in:
Timo Reymann
2023-02-15 00:19:14 +01:00
parent c25f947416
commit 762ae97a36
15 changed files with 920 additions and 2 deletions
+38
View File
@@ -0,0 +1,38 @@
# Logging
Provide logging helpers for structured logging
## Overview
Parse log level from text representation to level number
## Index
* [parse_log_level](#parse_log_level)
* [log](#log)
### parse_log_level
Parse log level from text representation to level number
#### Arguments
* **$1** (string): Log level to parse
#### Output on stdout
* numeric log level
### log
Log output on a given level, checks if $LOG_LEVEL, if not set defaults to INFO
#### Arguments
* **$1** (number): Numeric log level
* **$2** (string): Message to output
#### Output on stdout
* Formatted log message with ANSI color codes