Skip to main content

Class: Logger

logger/src.Logger

Hierarchy

  • Logger

    Logger

Constructors

constructor

new Logger(options?)

Parameters

NameType
optionsLoggerOptions

Overrides

BuiltinLogger.constructor

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:36

Properties

console

Readonly console: Console

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:16


depth

Readonly depth: number

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:34


formats

Readonly formats: Map<LogLevel, LoggerLevel>

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:22


join

Readonly join: string

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:28


level

level: LogLevel

Inherited from

BuiltinLogger.level

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2566


levels

Static Protected Readonly levels: Map<LogLevel, LogMethods>

Inherited from

BuiltinLogger.levels

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2576

Accessors

levels

Private get levels(): Map<LogLevel, LogMethods>

Returns

Map<LogLevel, LogMethods>

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:69


stylize

Static get stylize(): boolean

Returns

boolean

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:77

Methods

debug

debug(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.debug

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2570


error

error(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.error

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2573


fatal

fatal(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.fatal

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2574


has

has(level): boolean

Parameters

NameType
levelLogLevel

Returns

boolean

Inherited from

BuiltinLogger.has

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2568


info

info(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.info

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2571


preprocess

Protected preprocess(values): string

Parameters

NameTypeDescription
valuesreadonly unknown[]

Returns

string

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:64


trace

trace(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.trace

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2569


warn

warn(...values): void

Parameters

NameType
...valuesreadonly unknown[]

Returns

void

Inherited from

BuiltinLogger.warn

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:2572


write

write(level, ...values): void

Parameters

NameTypeDescription
levelLogLevel
...valuesreadonly unknown[]

Returns

void

Overrides

BuiltinLogger.write

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:50


createFormatMap

Static Private createFormatMap(options?, defaults?): Map<LogLevel, LoggerLevel>

Parameters

NameType
optionsLoggerFormatOptions
defaultsLoggerLevelOptions

Returns

Map<LogLevel, LoggerLevel>

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:81


ensureDefaultLevel

Static Private ensureDefaultLevel(options, defaults, color, name): LoggerLevel

Parameters

NameType
optionsundefined | LoggerLevelOptions
defaultsLoggerLevelOptions
colorColor
namestring

Returns

LoggerLevel

Defined in

projects/plugins/packages/logger/src/lib/Logger.ts:93