Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
onurravli committed Sep 25, 2023
1 parent 37e197a commit 363b578
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ const { Guvercin } = require('guvercin')

const guvercin = new Guvercin({
hideTime: true, // Is time hidden in logs?
timeFormat: 'DD/MM/YYYY HH:mm:ss', // Moment.js format
saveToLocal: true, // Is logs saved to local?
jsonOutput: true, // Is logs saved as JSON?
logPath: './logs.json', // If saveToLocal is true, logs will be saved to this path
saveToLocal: true, // Is logs saved to local?
separator: '@', // Separator between log type, log message and time
timeFormat: 'DD/MM/YYYY HH:mm:ss', // Moment.js format
})

guvercin.debug('This is a debug message')
guvercin.error('This is an error message')
guvercin.warning('This is a warning message')
guvercin.info('This is an info message')
guvercin.success('This is a success message')
guvercin.debug('This is a debug message')
guvercin.warning('This is a warning message')
```

## Usage (ES6)
Expand All @@ -44,18 +44,18 @@ import { Guvercin } from 'guvercin'

const guvercin = new Guvercin({
hideTime: true, // Is time hidden in logs?
timeFormat: 'DD/MM/YYYY HH:mm:ss', // Moment.js format
saveToLocal: true, // Is logs saved to local?
jsonOutput: true, // Is logs saved as JSON?
logPath: './logs.json', // If saveToLocal is true, logs will be saved to this path
saveToLocal: true, // Is logs saved to local?
separator: '@', // Separator between log type, log message and time
timeFormat: 'DD/MM/YYYY HH:mm:ss', // Moment.js format
})

guvercin.debug('This is a debug message')
guvercin.error('This is an error message')
guvercin.warning('This is a warning message')
guvercin.info('This is an info message')
guvercin.success('This is a success message')
guvercin.debug('This is a debug message')
guvercin.warning('This is a warning message')
```

## guvercin.config.json
Expand All @@ -65,11 +65,11 @@ You don't have to pass options to Guvercin constructor. You can create a `guverc
```json
{
"hideTime": true,
"timeFormat": "DD/MM/YYYY HH:mm:ss",
"saveToLocal": true,
"jsonOutput": true,
"logPath": "./logs.json",
"separator": "@"
"saveToLocal": true,
"separator": "@",
"timeFormat": "DD/MM/YYYY HH:mm:ss"
}
```

Expand Down

0 comments on commit 363b578

Please sign in to comment.