https://github.com/pfist/lloogg
A rreeaallyy simple log utility
https://github.com/pfist/lloogg
log logging logs
Last synced: 9 months ago
JSON representation
A rreeaallyy simple log utility
- Host: GitHub
- URL: https://github.com/pfist/lloogg
- Owner: pfist
- License: mit
- Created: 2017-01-26T05:09:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T03:37:59.000Z (over 8 years ago)
- Last Synced: 2025-10-06T01:47:15.790Z (9 months ago)
- Topics: log, logging, logs
- Language: JavaScript
- Size: 76.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# lloogg
A rreeaallyy simple logging utility with 4 levels and optional timestamps. Ideal for small side projects where you want elegant logging but don't need any fancy features.
## Install
```sh
$ npm install lloogg
```
## Usage
### Default Settings
```js
const Lloogg = require('lloogg')
const log = new Lloogg()
log.info('Something happened.')
log.warning('Something is wrong.')
log.error('Something broke. Oh no.')
log.success('Something worked! You deserve cheesecake.')
```
Output:

### Adding timestamps
```js
const Lloogg = require('lloogg')
const log = new Lloogg({
showTimestamp: true,
timestampLocale: 'en-US'
})
log.info('Something happened.')
log.warning('Something is wrong.')
log.error('Something broke. Oh no.')
log.success('Something worked! You deserve cheesecake.')
```
Output:

## API
### log.info(messages)
Accepts any number of arguments. Adds a colored `INFO` prefix to each message.
### log.warning(messages)
Accepts any number of arguments. Adds a colored `WARN` prefix to each message.
### log.error(messages)
Accepts any number of arguments. Adds a colored `ERR!` prefix to each message.
### log.success(messages)
Accepts any number of arguments. Adds a colored `YAY!` prefix to each message.
## License
MIT © Nick Pfisterer