README
slf4ts
Simple Logging Facade for NodeJS
This is the mono-repository for the slf4ts
modules.
slf4ts
modules are a collection of modules abstracting logging for nodejs libraries.
Compatible libraries use the slf4ts-api
module to get a Logger instance and do the logging.
The application, that use these libraries, choose a concrete logging library alongside the
corresponding slf4ts
logger binding module to make their dependencies use the chosen logging library.
Modules
Module | Description | Status | Link | |
---|---|---|---|---|
slf4ts-api | API / interface module | |||
Bindings | ||||
slf4ts-bunyan | Bunyan Logger Binding | bunyan | ||
slf4ts-console | Console Logger Binding | nodejs console | ||
slf4ts-log4js | log4js Logger Binding | log4js | ||
slf4ts-loglevel | loglevel Logger Binding | loglevel | ||
slf4ts-pino | pino Logger Binding | pino | ||
slf4ts-winston | Winston Logger Binding | winston | ||
Adapter | ||||
slf4ts-cassandra-log-adapter | Log adapter for cassandra nodejs client lib | cassandra-driver | ||
slf4ts-elasticsearch-log-adapter | Log adapter for elasticsearch nodejs client lib | deprecated | elasticsearch |
Examples
Code examples for javascript
and typescript
are in the examples
folder.
project development
init / update project (if a new dependency is introduced or an existing is updated):
npm i -g pnpm
pnpm i
generate dependency report:
# run 'pnpm run build' before checking dependencies
docker-compose run --rm deps
release packages / publish docs:
# check functionality
pnpm i
pnpm run build
# public packages
# change version in every dependent package
pnpm i
pnpm publish --filter slf4ts-api
git add .
git commit -m "publish version x.y.z of slf4ts-api"
git tag slf4ts-api@x.y.z
git push
git push origin slf4ts-api@x.y.z
# publish docs
rm -fr docs/
git branch -D gh-pages
git worktree prune
git worktree list
git worktree add -b gh-pages docs origin/gh-pages
pnpm run publishDocs