Methods
# benchmark() → {function}
This decorator wraps the target method to emit Logger.benchmark entries that capture completion time or failure latency.
A method decorator that records execution time at the benchmark level.
A method decorator proxy that benchmarks the original implementation.
function
# debug() → {function}
This is a convenience wrapper around log that logs using LogLevel.debug.
A method decorator for logging function calls with the debug level.
A debug-level logging decorator.
function
# final() → {function}
This decorator prevents overriding by marking the method descriptor as non-configurable. It will throw an error if it is applied to non-method targets.
Creates a decorator that makes a method non-configurable.
A decorator that hardens the method descriptor.
function
# info() → {function}
This is a convenience wrapper around log that logs using LogLevel.info.
A method decorator for logging function calls with the info level.
An info-level logging decorator.
function
# log(levelopt, verbosityopt, entryMessageopt, exitMessageopt) → {function}
This decorator wraps a class method to automatically log entry, exit, timing, and optional custom messages at a configurable LogLevel.
A method decorator for logging function calls.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
level |
LogLevel
|
<optional> |
LogLevel.info | The log level to apply to the generated log statements. |
verbosity |
number
|
<optional> |
0 | The verbosity threshold that is required for the entry log to appear. |
entryMessage |
ArgFormatFunction
|
<optional> |
A formatter that is invoked with the original method arguments to describe the invocation. |
|
exitMessage |
ReturnFormatFunction
|
<optional> |
An optional formatter that describes the outcome or failure of the call. |
A method decorator proxy that injects logging behavior.
function
# silly() → {function}
This is a convenience wrapper around log that logs using LogLevel.silly.
A method decorator for logging function calls with the silly level.
A silly-level logging decorator.
function
# trace() → {function}
This is a convenience wrapper around log that logs using LogLevel.trace.
A method decorator for logging function calls with the trace level.
A trace-level logging decorator.
function
# verbose(verbosityopt) → {function}
This is a convenience wrapper around log that logs using LogLevel.verbose with a configurable verbosity.
A method decorator for logging function calls with the verbose level.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
verbosity |
number
|
boolean
|
<optional> |
0 | The verbosity level for log filtering or a flag to enable benchmarking. |
A verbose logging decorator.
function