https://github.com/leydev/console-tl
A console that emits logs with date and time for nodejs
https://github.com/leydev/console-tl
Last synced: about 1 month ago
JSON representation
A console that emits logs with date and time for nodejs
- Host: GitHub
- URL: https://github.com/leydev/console-tl
- Owner: leydev
- Created: 2020-02-13T15:21:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-26T19:01:14.000Z (about 6 years ago)
- Last Synced: 2025-02-03T05:03:42.794Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 123 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# console-lt (Console Log Time)
## Description
A Console that emits logs with date and time
See the documentation: [/docs](https://leydev.github.io/console-tl/)
## Install and use
Instalation:
```
$ npm i console-lt
```
Usage:
```
const consoleLT = require('console-lt')
consoleLT.log('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [LOG]: Hello Wolrd
consoleLT.info('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [INFO]: Hello Wolrd
consoleLT.warn('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [WARN]: Hello Wolrd
consoleLT.error('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [ERROR]: Hello Wolrd
```
Method "overwrite" will change the default global console to also display date and time
Here's an example:
```
require('console-lt').overwrite()
console.log('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [LOG]: Hello Wolrd
console.info('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [INFO]: Hello Wolrd
console.warn('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [WARN]: Hello Wolrd
console.error('Hello Wolrd') //Output: 2020-02-13 14:01:23.234 [ERROR]: Hello Wolrd
```
**Changelog**
**21/02/2020**
- Método overwrite().
**13/02/2020**
- Criação do módulo;
- Método log();
- Método info();
- Método warn();
- Método error().