4.0.5 • Published 4 years ago
fancylog v4.0.5
📜 Fancy Log
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
4 years ago
4.0.4
4 years ago
4.0.3
5 years ago
4.0.2
5 years ago
4.0.1
5 years ago
4.0.0
5 years ago
3.2.1
5 years ago
3.2.0
5 years ago
3.1.1
7 years ago
3.1.0
7 years ago
3.0.0
7 years ago
2.3.0
7 years ago
2.2.4
8 years ago
2.1.2
8 years ago
1.4.4
8 years ago
1.4.3
8 years ago
1.3.5
8 years ago
1.3.4
8 years ago
1.3.2
8 years ago
1.2.5
8 years ago
1.2.4
8 years ago