Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/log/logger.ts>Logger#_log

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Logger.prototype._log
import { Logger } from "https://deno.land/std@0.104.0/log/logger.ts";

If the level of the logger is greater than the level to log, then nothing is logged, otherwise a log record is passed to each log handler. msg data passed in is returned. If a function is passed in, it is only evaluated if the msg will be logged and the return value will be the result of the function, not the function itself, unless the function isn't called, in which case undefined is returned. All types are coerced to strings for logging.

Parameters

level: number
msg: (T extends GenericFunction ? never : T) | (() => T)
...args: unknown[]

Returns

T | undefined