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.
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.
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.
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.
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.
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.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
level |
LogLevel
|
Log level applied to the generated log statements (defaults to |
||
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. |
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.
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.
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. |
Verbose logging decorator.
function