https://github.com/n0ky4/gulog
A simple NodeJS console logger.
https://github.com/n0ky4/gulog
logger logging nodejs
Last synced: about 2 months ago
JSON representation
A simple NodeJS console logger.
- Host: GitHub
- URL: https://github.com/n0ky4/gulog
- Owner: n0ky4
- License: mit
- Created: 2021-06-30T02:25:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-13T02:44:55.000Z (over 2 years ago)
- Last Synced: 2026-04-02T04:56:42.013Z (3 months ago)
- Topics: logger, logging, nodejs
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gulog
> A simple console logger.
## Installation
```console
$ npm install gulog
```
## Usage
```js
const log = require('gulog');
// All possible options
log.setup({
usePrefix: true,
prefix: '[gulog]',
prefixColor: 'magenta',
info: {
usePrefix: true,
prefix: '[info]',
prefixColor: 'cyan',
messageColor: 'white',
},
error: {
usePrefix: true,
prefix: '[error]',
prefixColor: 'redBright',
messageColor: 'red',
},
warning: {
usePrefix: true,
prefix: '[warn]',
prefixColor: 'yellowBright',
messageColor: 'yellow',
},
success: {
usePrefix: true,
prefix: '[success]',
prefixColor: 'green',
messageColor: 'white',
},
});
log.info('This is an information :)');
log.success('success, yeah!!!');
log.warning('Whoops... A warning.');
log.error('Oh no! An error 😨 😨');
```
### Result