UNPKG

@toreda/log

Version:

Lightweight TypeScript logger with flexible custom transports.

93 lines (92 loc) 2.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Levels = void 0; /** * Bitmasks for each log level. * * @category Log Level */ var Levels; (function (Levels) { /** * Empty bitmask to disable all levels. * * `&` BITWISE AND - Disable all levels. * * `|` BITWISE OR - No effect. */ Levels[Levels["NONE"] = 0] = "NONE"; /** * Bitmask for Error log level. * * `&` BITWISE AND - Disable all levels except error. * * `|` BITWISE OR - Enable error level without changing other * active levels. */ Levels[Levels["ERROR"] = 1] = "ERROR"; /** * Bitmask for Warn log level. * * `&` BITWISE AND - Disable all levels except warn. * * `|` BITWISE OR - Enable warn level without changing other * active levels. */ Levels[Levels["WARN"] = 2] = "WARN"; /** * Bitmask for Info log level. * * `&` BITWISE AND - Disable all levels except info. * * `|` BITWISE OR - Enable info level without changing other * active levels. */ Levels[Levels["INFO"] = 4] = "INFO"; /** * Bitmask for Debug log level. * * `&` BITWISE AND - Disable all levels except debug. * * `|` BITWISE OR - Enable debug level without changing other * active levels. */ Levels[Levels["DEBUG"] = 8] = "DEBUG"; /** * Bitmask for Trace log level. * * `&` BITWISE AND - Disable all levels except trace. * * `|` BITWISE OR - Enable trace level without changing other * active levels. */ Levels[Levels["TRACE"] = 16] = "TRACE"; /** * Bitmask for all built-in log levels. * * `&` BITWISE AND - Enable all built-in log levels and disable * all custom log levels. * * `|` BITWISE OR - Enable all built-in log levels without * affecting custom log levels. */ Levels[Levels["ALL"] = 255] = "ALL"; /** * Bitmask for all custom log levels. * * `&` BITWISE AND - Enable all custom levels and disable * all built-in log levels. * * `|` BITWISE OR - Enable all custom log levels without affecting * built-in log levels. */ Levels[Levels["ALL_CUSTOM"] = 9007199254740736] = "ALL_CUSTOM"; /** * Bitmask for all log levels. * * `&` BITWISE AND - Enable all built-in and all custom log levels. * * `|` BITWISE OR - Enable all built-in and all custom log levels. */ Levels[Levels["ALL_EXTENDED"] = 9007199254740991] = "ALL_EXTENDED"; })(Levels = exports.Levels || (exports.Levels = {}));