Function info
- info<T>(msg, ...args): T | undefined
Type Parameters
Parameters
Returns T | undefined
The message that was logged.
Example: Usage
import { info } from "@std/log/info";
import { assertEquals } from "@std/assert/equals";
assertEquals(info("This is an info message."), "This is an info message.");
// Prints: "INFO This is an info message."
assertEquals(info(() => "This is an info message."), "This is an info message.");
// Prints: "INFO This is an info message."- info<T>(msg, ...args): T
Log at the info level.
This function is a pass-through to the default logger's
infomethod. By default, the default logger is configured to use console.log and print in blue text.Type Parameters
Parameters
- msg: T extends GenericFunction
? never
: TThe message to log.
Rest...args: unknown[]Arguments to be formatted into the message.
Returns T
The message that was logged.
Example: Usage
import { info } from "@std/log/info";
import { assertEquals } from "@std/assert/equals";
assertEquals(info("This is an info message."), "This is an info message.");
// Prints: "INFO This is an info message."
assertEquals(info(() => "This is an info message."), "This is an info message.");
// Prints: "INFO This is an info message."- msg: T extends GenericFunction
Log at the info level.
This function is a pass-through to the default logger's
infomethod. By default, the default logger is configured to use console.log and print in blue text.