Global

Members

# constant now

Chooses the most precise timer available in the current runtime, preferring performance.now or process.hrtime.bigint.

High-resolution clock accessor returning milliseconds.

View Source time.ts, line 24

Methods

# benchmark() → {function}

Wraps the target method to emit Logger.benchmark entries capturing completion time or failure latency.

Method decorator that records execution time at the benchmark level.

sequenceDiagram participant Caller participant Decorator as benchmark participant Method as Original Method Caller->>Decorator: invoke() Decorator->>Method: Reflect.apply(...) alt Promise result Method-->>Decorator: Promise Decorator->>Decorator: attach then() Decorator->>Decorator: log completion duration else Synchronous result Method-->>Decorator: value Decorator->>Decorator: log completion duration end Decorator-->>Caller: return result

View Source decorators.ts, line 79

Method decorator proxy that benchmarks the original implementation.

function

# debug() → {function}

Convenience wrapper around log that logs using LogLevel.debug.

Method decorator for logging function calls with debug level.

View Source decorators.ts, line 138

Debug-level logging decorator.

function

# final() → {function}

Prevents overriding by marking the method descriptor as non-configurable, throwing if applied to non-method targets.

Creates a decorator that makes a method non-configurable.

View Source decorators.ts, line 196

Decorator that hardens the method descriptor.

function

# info() → {function}

Convenience wrapper around log that logs using LogLevel.info.

Method decorator for logging function calls with info level.

View Source decorators.ts, line 152

Info-level logging decorator.

function

# log(level, verbosityopt, entryMessageopt, exitMessageopt) → {function}

Wraps class methods to automatically log entry, exit, timing, and optional custom messages at a configurable LogLevel.

Method decorator for logging function calls.

sequenceDiagram participant Client participant Decorator as log decorator participant Method as Original Method participant Logger as Logging instance Client->>Decorator: call decorated method Decorator->>Logger: log method call Decorator->>Method: call original method alt result is Promise Method-->>Decorator: return Promise Decorator->>Decorator: attach then handler Note over Decorator: Promise resolves Decorator->>Logger: log benchmark (if enabled) Decorator-->>Client: return result else result is not Promise Method-->>Decorator: return result Decorator->>Logger: log benchmark (if enabled) Decorator-->>Client: return result end
Parameters:
Name Type Attributes Default Description
level LogLevel

Log level applied to the generated log statements (defaults to LogLevel.info).

verbosity number <optional>
0

Verbosity threshold required for the entry log to appear.

entryMessage ArgFormatFunction <optional>

Formatter invoked with the original method arguments to describe the invocation.

exitMessage ReturnFormatFunction <optional>

Optional formatter that describes the outcome or failure of the call.

View Source decorators.ts, line 6

Method decorator proxy that injects logging behavior.

function

# silly() → {function}

Convenience wrapper around log that logs using LogLevel.silly.

Method decorator for logging function calls with silly level.

View Source decorators.ts, line 162

Silly-level logging decorator.

function

# trace() → {function}

Convenience wrapper around log that logs using LogLevel.trace.

Method decorator for logging function calls with trace level.

View Source decorators.ts, line 172

Trace-level logging decorator.

function

# verbose(verbosity) → {function}

Convenience wrapper around log that logs using LogLevel.verbose with configurable verbosity and optional benchmarking.

Method decorator for logging function calls with verbose level.

Parameters:
Name Type Description
verbosity number | boolean

Verbosity level for log filtering or flag to enable benchmarking.

View Source decorators.ts, line 182

Verbose logging decorator.

function