Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olian04/better-logging
better-logging is a drop in replacement for the default logging methods of node.js
https://github.com/olian04/better-logging
console javascript logging logging-library npm-package typescript
Last synced: 6 days ago
JSON representation
better-logging is a drop in replacement for the default logging methods of node.js
- Host: GitHub
- URL: https://github.com/olian04/better-logging
- Owner: Olian04
- License: mit
- Created: 2018-07-05T08:34:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T11:12:47.000Z (8 months ago)
- Last Synced: 2025-02-02T03:42:06.461Z (6 days ago)
- Topics: console, javascript, logging, logging-library, npm-package, typescript
- Language: TypeScript
- Homepage: https://olian04.gitbook.io/better-logging/
- Size: 642 KB
- Stars: 174
- Watchers: 4
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![NPM Version](https://img.shields.io/npm/v/better-logging.svg)](https://www.npmjs.com/package/better-logging)
![Supported Types](https://img.shields.io/npm/types/better-logging.svg)
[![NPM Downloads](https://img.shields.io/npm/dt/better-logging.svg)](https://www.npmjs.com/package/better-logging)
[![Build Status Master](https://img.shields.io/github/workflow/status/olian04/better-logging/Node.js%20CI/master?label=build%20%28master%29)](https://github.com/Olian04/better-logging/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster+event%3Apush)
[![Build Status Dev](https://img.shields.io/github/workflow/status/olian04/better-logging/Node.js%20CI/dev?label=build%20%28dev%29)](https://github.com/Olian04/better-logging/actions?query=workflow%3A%22Node.js+CI%22+branch%3Adev+event%3Apush)
![LICENSE](https://img.shields.io/npm/l/better-logging.svg)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FOlian04%2Fbetter-logging.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FOlian04%2Fbetter-logging?ref=badge_shield)# better-logging
![demo output of better-logging in action](images/output.png)
Out of the box Javascript comes five different standardized logging types. However, as it stands only browsers are taking advantage of these different methods of logging. `better-logging` aims to improve the default logging experience of any node application, it is designed to be a drop in replacement for the default logging methods.
Since `better-logging` only decorates the default logging methods you won't lose any functionality provided by other tooling. `better-logging` is not meant to be the be all and end all of node.js logging. It is just supposed to increase the usefulness of the default logging methods.**Install:** [`npm i better-logging`](https://www.npmjs.com/package/better-logging)
---
```js
// Default in node.js
console.debug('foo'); // foo
console.log('foo'); // foo
console.info('foo'); // foo
console.warn('foo'); // foo
console.error('foo'); // foo// With better-logging
require('better-logging')(console);console.debug('foo'); // [11:46:35.294] [debug] foo
console.log('foo'); // [11:46:35.296] [log] foo
console.info('foo'); // [11:46:35.296] [info] foo
console.warn('foo'); // [11:46:35.298] [warn] foo
console.error('foo'); // [11:46:35.298] [error] foo
console.line('foo'); // foo
```## Documentation
https://olian04.gitbook.io/better-logging/
## License
_See [LICENSE](./LICENSE)_
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FOlian04%2Fbetter-logging.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FOlian04%2Fbetter-logging?ref=badge_large)