This project contains the implementation of a stanza library for generating logging output.
This project is loosely based on the Python logging module. The idea is to provide the user with the ability to create a tree of loggers with abstracted handling facilities.
Example:
val logger = get-logger("auth")
public defn access-resource(request):
debug(logger, "User '%_' Attemping Login" % [user(request)])
if not authenticate(request):
error(logger, "User '%_' Failed to Login" % [user(request)])
...
This project is a work in progress. I want to add the following additional features:
- Configuration from a TOML or JSON object.
- Additional logging handlers like File Handlers and UDP/syslog Handlers.
- Additional Formatters for JSON, etc.
- Add exception object handling and formatting.
- Add timestamp support
- Current stanza core library doesn't support this any date facility.
- Probably needs a new library.
- Contextual data in the form of
KeyValue
objects.
- If you are using JITx in VSCode
- You can run the unit tests with
Ctrl-P
and thentask tests
- You can run the unit tests with
- Building from the command line:
- Make sure
stanza
is on your path. - On Windows:
- Install MinGW-w64 and make sure the
mingw-make.exe
is on your path. mingw-make.exe
- Builds the package files.mingw-make.exe tests
- Runs the unit tests- On Linux:
sudo apt install build-essential
make
- Builds the packagesmake tests
- Runs the unit tests.
- Make sure