4.0.5 • Published 5 years ago

fancylog v4.0.5

Weekly downloads
96
License
ISC
Repository
github
Last release
5 years ago

📜 Fancy Log

NPM version NPM downloads Build status Dependencies Coverage Status

Fancy Logging!
Written in TypeScript, compiled down to ES5 for use in any Node.js version!

💾 Installation

The package is on the NPM registry as fancylog. Simply install it with your NPM client of choice.

🔧 Usage

First, import the module:

// CommonJS
const log = require('fancylog')

// ES Modules
import * as log from 'fancylog'

From there you can call any of the log level functions:

log.info()
log.debug()
log.error()
log.verbose()
log.warn()

You can also instantiate the FileLogger class to automatically log to a file as well as the console.

// CommonJS
const { FileLogger } = require('fancylog')

// ES Modules
import { FileLogger } from 'fancylog'

const log = new FileLogger('/path/to/file.log')
log.info()

📝 Example Output

Calling:

log.info('hello world')
log.debug('hello world')
log.verbose('hello world')

Would result in:

[14/02/2019 09:02:54] [INFO]    | hello world
[14/02/2019 09:02:54] [DEBUG]   | hello world
[14/02/2019 09:02:54] [VERBOSE] | hello world
4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.3.0

9 years ago

2.2.4

9 years ago

2.1.2

9 years ago

1.4.4

9 years ago

1.4.3

9 years ago

1.3.5

9 years ago

1.3.4

9 years ago

1.3.2

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago