vael:console
Standard console output methods mirroring globalThis.console.
Available in both vjs (vaeljs) and vjs-lite (vaeljs-lite) runtimes.
Exports the same live log, debug, info, warn, and error function
objects installed on globalThis.console.
import ... from "vael:console"
vaeljs-core; vael-console (default) in vaeljs-lite-coreExample
Section titled “Example”import { error, info, log } from "vael:console";
log("server starting");info("listening on port", 8080);error("unexpected state");logv0.0.0-alpha.0debugv0.0.0-alpha.0infov0.0.0-alpha.0warnv0.0.0-alpha.0errorv0.0.0-alpha.0Functions
Section titled “Functions”export function log(...args: unknown[]): void;
Write formatted arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidimport { log } from "vael:console";
log("status:", "ready");export function debug(...args: unknown[]): void;
Write formatted debug arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidexport function info(...args: unknown[]): void;
Write formatted informational arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidexport function warn(...args: unknown[]): void;
Write formatted warning arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidexport function error(...args: unknown[]): void;
Write formatted error arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidimport { error } from "vael:console";
error("failed to bind port");Interfaces
Section titled “Interfaces”VaelConsole
Section titled “VaelConsole”export interface VaelConsole {
log(...args: unknown[]): void;
debug(...args: unknown[]): void;
info(...args: unknown[]): void;
warn(...args: unknown[]): void;
error(...args: unknown[]): void;
}
Runtime console object installed on globalThis.console (vjs and vjs-lite).
VaelConsole.log
Section titled “VaelConsole.log”log(...args: unknown[]): void;
Write formatted arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidVaelConsole.debug
Section titled “VaelConsole.debug”debug(...args: unknown[]): void;
Write formatted debug arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidVaelConsole.info
Section titled “VaelConsole.info”info(...args: unknown[]): void;
Write formatted informational arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidVaelConsole.warn
Section titled “VaelConsole.warn”warn(...args: unknown[]): void;
Write formatted warning arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidVaelConsole.error
Section titled “VaelConsole.error”error(...args: unknown[]): void;
Write formatted error arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidDefault Export
Section titled “Default Export”default export
Section titled “default export”const consoleObject: VaelConsole;
export default consoleObject;
Default export: the live console object installed by the runtime.
