https://github.com/hdrajs/winston-logger
https://github.com/hdrajs/winston-logger
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hdrajs/winston-logger
- Owner: hdrajs
- Created: 2024-12-04T01:59:37.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T04:17:37.000Z (6 months ago)
- Last Synced: 2024-12-28T06:15:08.411Z (5 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# winton-logger
## SUMMARY
A simple logging library that combines the simple base on winston
## USAGE
A logger has 5 different levels of logging in a specific order:
'ERROR', 'WARN', 'INFO', 'DEBUG', 'VERBOSE', 'SUCCESS'
Each of these log levels has its own method on the logging instance. You can set the maximum log level on a logger at runtime.By default, a logger writes to STDOUT, but given a writeable file path, it will log directly to a file.
### Install
Using NPM:
```
npm install winston-logger
```Using YARN:
```
yarn add winston-logger
```### Logging
```js
import { Logger, LoggerOptions } from 'winston-logger';const options :LoggerOptions ={
file:true
}const logger = new Logger("Instance name",options)
logger.error('hello world')
logger.warn('hello world')
logger.log('hello world')
logger.debug('hello world')
logger.verbose('hello world')
logger.success('hello world')
```## COMMENTS/ISSUES
F-f-fork it, baby.
## LICENSE
MIT, see the source.