perfect-logger
Version:
A customizable logger that can be used with NodeJS application for terminal logging purposes
28 lines • 1.47 kB
JavaScript
module.exports = {
LOCKFILE_NAME: 'logger.lock',
STAR_LINE: '***************************************************************************************************',
STAR_INDENT: '*** ',
CONSOLE_COLORS: {
BLACK: '\x1b[30m',
RED: '\x1b[31m',
GREEN: '\x1b[32m',
YELLOW: '\x1b[33m',
BLUE: '\x1b[34m',
MAGENTA: '\x1b[35m',
CYAN: '\x1b[36m',
WHITE: '\x1b[37m',
DEFAULT: ''
},
CONSOLE_RESET: '\x1b[0m',
CONSOLE_ANIMATION: ["⢀⠀", "⡀⠀", "⠄⠀", "⢂⠀", "⡂⠀", "⠅⠀", "⢃⠀", "⡃⠀", "⠍⠀", "⢋⠀", "⡋⠀", "⠍⠁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⢈⠩", "⡀⢙", "⠄⡙", "⢂⠩", "⡂⢘", "⠅⡘", "⢃⠨", "⡃⢐", "⠍⡐", "⢋⠠", "⡋⢀", "⠍⡁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⠈⠩", "⠀⢙", "⠀⡙", "⠀⠩", "⠀⢘", "⠀⡘", "⠀⠨", "⠀⢐", "⠀⡐", "⠀⠠", "⠀⢀", "⠀⡀"],
CONSOLE_ANIMATION_SPEED: 100,
NO_MAX_LOG_SIZE: -1,
LOG_LEVEL_DISABLED: -1,
LOG_LEVEL_DEBUG: 0,
LOG_LEVEL_INFO: 4,
LOG_LEVEL_WARNING: 8,
LOG_LEVEL_CRITICAL: 10,
DEFAULT_TIMEZONE: 'UTC',
DEFAULT_CUSTOM_BANNER: 'THIS IS AN UNPUBLISHED DOCUMENT WHICH MAY CONTAIN SENSITIVE INFORMATION.',
DEFAULT_MODULE_NAME: 'UNKNOWN_MODULE'
};