Skip to main content

Class: LoggerTimestamp

@sapphire/plugin-logger.LoggerTimestamp

Logger utility that formats a timestamp.

since 1.0.0

Constructors

constructor

โ€ข new LoggerTimestamp(options?)

Parameters

NameType
optionsLoggerTimestampOptions

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:33

Properties

color

โ€ข color: null | LoggerStyle

The logger style to apply the color to the timestamp.

since 1.0.0

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:25


formatter

โ€ข formatter: LoggerTimestampFormatter

The final formatter.

since 1.0.0

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:31


timestamp

โ€ข timestamp: Timestamp

The timestamp used to format the current date.

since 1.0.0

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:13


utc

โ€ข utc: boolean

Whether or not the logger will show a timestamp in UTC.

since 1.0.0

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:19

Methods

run

โ–ธ run(): string

Formats the current time.

since 1.0.0

Returns

string

Defined in

projects/plugins/packages/logger/src/lib/LoggerTimestamp.ts:44