1.2.2 • Published 23 days ago

guvercin v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
23 days ago

Guvercin

Guvercin (Turkish word for "dove", pronounced /ɡyverˈdʒin/) is a very simple logger library for Node.js.

Installation

pnpm install guvercin

Usage (CommonJS)

const { Guvercin } = require('guvercin')

const guvercin = new Guvercin({
  hideTime: true,
  logPath: './logs.log',
  saveToLocal: true,
  separator: '@',
  timeFormat: 'DD/MM/YYYY HH:mm:ss',
  name: 'BACKEND',
})

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

Usage (ES6)

import { Guvercin } from 'guvercin'

const guvercin = new Guvercin({
  hideTime: true,
  jsonOutput: true,
  logPath: './logs.log',
  saveToLocal: true,
  separator: '@',
  timeFormat: 'DD/MM/YYYY HH:mm:ss',
  name: 'BACKEND',
})

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

guvercin.config.json

You don't have to pass options to Guvercin constructor. You can create a guvercin.config.json file in your project root and pass options to Guvercin from there.

{
  "hideTime": true,
  "logPath": "./logs.log",
  "saveToLocal": true,
  "separator": "@",
  "timeFormat": "DD/MM/YYYY HH:mm:ss",
  "name": "FRONTEND"
}

NOTE: If you pass options to Guvercin constructor, they will override the options in guvercin.config.json.

1.2.2

23 days ago

1.2.1

4 months ago

1.2.0

4 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago