1.4.0 • Published 7 years ago

dbcustomlog v1.4.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Installation

Install the package using
npm i dbcustomlog

To add it as a dependency, use
yarn add dbcustomlog or npm i -S dbcustomlog

Once installed, require the package with

const logger = require('dbcustomlog')
const log = new logger()

Usage

Call one of the following functions or shortcuts for different levels of warning.

i or info
s or success
e or error
c or command
w or warn

Example Call

log.i(msg)
// Where msg is the message you want to log

File Output

To output to a file, pass the file path as an argument when creating the new class

// Example
const path = require('path')
const log = new logger(path.join(__dirname, 'default.log'))

Examples

// Info
log.i("Log Message")
// Debug
log.s("Log Message")
// Error
log.e("Log Message")
// Verbose
log.c("Log Message")
// Warn
log.w("Log Message")

Would Output

[INFO]    [01/01/1970 00:00:00] Log Message
[SUCCESS]   [01/01/1970 00:00:00] Log Message
[ERROR]   [01/01/1970 00:00:00] Log Message
[COMMAND] [01/01/1970 00:00:00] Log Message
[WARN]    [01/01/1970 00:00:00] Log Message
1.4.0

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.0

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago