https://github.com/rstiller/slf4ts
Simple logging facade for nodejs
https://github.com/rstiller/slf4ts
logging logging-facade nodejs
Last synced: 8 months ago
JSON representation
Simple logging facade for nodejs
- Host: GitHub
- URL: https://github.com/rstiller/slf4ts
- Owner: rstiller
- License: mit
- Created: 2018-12-17T19:48:32.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T21:41:49.000Z (over 2 years ago)
- Last Synced: 2025-09-17T02:26:00.116Z (9 months ago)
- Topics: logging, logging-facade, nodejs
- Language: TypeScript
- Homepage: https://rstiller.github.io/slf4ts/
- Size: 2.89 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slf4ts
Simple Logging Facade for NodeJS
[](https://github.com/rstiller/slf4ts/actions/workflows/ci.yml)
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](packages/slf4ts-api) | API / interface module | | |   |
| Bindings | | | | |
| [slf4ts-bunyan](packages/slf4ts-bunyan) | Bunyan Logger Binding | | [bunyan](https://github.com/trentm/node-bunyan#readme) |   |
| [slf4ts-console](packages/slf4ts-console) | Console Logger Binding | | [nodejs console](https://nodejs.org/api/console.html) |   |
| [slf4ts-log4js](packages/slf4ts-log4js) | log4js Logger Binding | | [log4js](https://log4js-node.github.io/log4js-node/) |   |
| [slf4ts-loglevel](packages/slf4ts-loglevel) | loglevel Logger Binding | | [loglevel](https://github.com/pimterry/loglevel) |   |
| [slf4ts-pino](packages/slf4ts-pino) | pino Logger Binding | | [pino](https://getpino.io/#/) |   |
| [slf4ts-winston](packages/slf4ts-winston) | Winston Logger Binding | | [winston](https://github.com/winstonjs/winston) |   |
| Adapter | | | | |
| [slf4ts-cassandra-log-adapter](packages/slf4ts-cassandra-log-adapter) | Log adapter for cassandra nodejs client lib | | [cassandra-driver](https://github.com/datastax/nodejs-driver) |   |
| [slf4ts-elasticsearch-log-adapter](packages/slf4ts-elasticsearch-log-adapter) | Log adapter for elasticsearch nodejs client lib | deprecated | [elasticsearch](https://github.com/elastic/elasticsearch-js) |   |
## 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
## License
[MIT](https://www.opensource.org/licenses/mit-license.php)