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?): LoggerTimestamp

Parameters

NameType
optionsLoggerTimestampOptions

Returns

LoggerTimestamp

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.

Returns

string

Since

1.0.0

Defined in

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