Global

Methods

# debug(benchmarkopt) → {function}

Convenience wrapper around the log decorator that uses LogLevel.debug

Method decorator for logging function calls with debug level

Parameters:
Name Type Attributes Default Description
benchmark boolean <optional>
false

Whether to log execution time (default: false)

View Source decorators.ts, line 64

A method decorator that wraps the original method with debug logging

function

# info(benchmarkopt) → {function}

Convenience wrapper around the log decorator that uses LogLevel.info

Method decorator for logging function calls with info level

Parameters:
Name Type Attributes Default Description
benchmark boolean <optional>
false

Whether to log execution time (default: false)

View Source decorators.ts, line 75

A method decorator that wraps the original method with info logging

function

# log(level, benchmarkopt, verbosityopt) → {function}

Creates a decorator that logs method calls with specified level, benchmarking, and verbosity

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

The log level to use (default: LogLevel.info)

benchmark boolean <optional>
false

Whether to log execution time (default: false)

verbosity number <optional>
0

The verbosity level for the log messages (default: 0)

View Source decorators.ts, line 4

A method decorator that wraps the original method with logging

function

# silly(benchmarkopt) → {function}

Convenience wrapper around the log decorator that uses LogLevel.silly

Method decorator for logging function calls with silly level

Parameters:
Name Type Attributes Default Description
benchmark boolean <optional>
false

Whether to log execution time (default: false)

View Source decorators.ts, line 86

A method decorator that wraps the original method with silly logging

function

# verbose(verbosity, benchmarkopt) → {function}

Convenience wrapper around the log decorator that uses LogLevel.verbose with configurable verbosity

Method decorator for logging function calls with verbose level

Parameters:
Name Type Attributes Default Description
verbosity number

The verbosity level for the log messages (default: 0)

benchmark boolean <optional>
false

Whether to log execution time (default: false)

View Source decorators.ts, line 97

A method decorator that wraps the original method with verbose logging

function