Options
All
  • Public
  • Public/Protected
  • All
Menu

Package logger

@typed/logger

A generic interface for logging data

Index

Type aliases

CreateConsoleLoggerOptions

CreateConsoleLoggerOptions: { clock: Clock; logLevel: LogLevel }

Type declaration

  • Readonly clock: Clock
  • Readonly logLevel: LogLevel

CreateTestLoggerOptions

CreateTestLoggerOptions: { clock: Clock; logLevel: LogLevel }

Type declaration

  • Readonly clock: Clock
  • Readonly logLevel: LogLevel

Log

Log: { message: string; type: "log" } | { message: string; type: "error" } | { type: "clear" } | { message: string; type: "info" } | { message: string; type: "debug" } | { label: string; time: number; type: "timeStart" } | { label: string; time: number; type: "timeEnd" }

LoggerEnv

LoggerEnv: { logger: Logger }

Type declaration

Logs

Logs: ReadonlyArray<Log>

TestLogger

TestLogger: { getLogs: () => Logs; logger: Logger }

Type declaration

Functions

clear

createConsoleLogger

  • createConsoleLogger(__namedParameters: { clock: Clock; logLevel: LogLevel }): Logger

createTestLogger

debug

  • debug(msg: string): Effects<LoggerEnv, void>

error

  • error(msg: string): Effects<LoggerEnv, void>

info

  • info(msg: string): Effects<LoggerEnv, void>

log

time

  • time(label: string): Effects<LoggerEnv, Effects<unknown, number>>

Generated using TypeDoc