Files
bash-tui-toolkit/docs/modules/Logging.md
Timo Reymann 762ae97a36 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
2023-02-15 00:19:14 +01:00

39 lines
621 B
Markdown

# 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