Global

Methods

loog(configopt)

This function serves as the loog object and a function to reconfigure it. A quick example:

 // Use its methods directly, with the default configuration
 const loog = require('loog');
 loog.info('Hi!'); 

 // Use it as a function to reconfigure the instance
 const loog = require('loog')({
     prefixStyle: 'emoji'
 });
 loog.info('Hi!');
Source:
Parameters:
Name Type Attributes Description
config Object <optional>

The initial config

Name Type Attributes Default Description
prefixStyle string <optional>
text

The prefix style, one of ['text', 'emoji', 'ascii', 'none'].

logLevel string <optional>
info

The log level, one of ['silly', 'debug', 'info', 'warn', 'error', 'silent'].