This module provides a simple logging function. It can log messages to the console with settings.
This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun




JSR Score
100%
Published
a year ago (0.2.0)
This module provides a simple logging function. It can log messages to the console with settings.
Example 1
Example 1
import { updateSettings, log, types, typeLog } from './log'; log('Hello, world!'); // Logs 'Hello, world!' updateSettings({ timestamp: true }); log('Hello, world!'); // Logs the current time before the message typeLog(types.INFO, 'Information message'); // Logs an info message with type typeLog(types.ERROR, 'Error message'); // Logs an error message with type typeLog(types.WARNING, 'Warning message'); // Logs a warning message with type typeLog('CUSTOM', 'Custom message'); // Logs a custom message with type
Add Package
deno add jsr:@hikyu/log
Import symbol
import * as log from "@hikyu/log";
Import directly with a jsr specifier
import * as log from "jsr:@hikyu/log";
Add Package
pnpm i jsr:@hikyu/log
pnpm dlx jsr add @hikyu/log
Import symbol
import * as log from "@hikyu/log";
Add Package
yarn add jsr:@hikyu/log
yarn dlx jsr add @hikyu/log
Import symbol
import * as log from "@hikyu/log";
Add Package
vlt install jsr:@hikyu/log
Import symbol
import * as log from "@hikyu/log";
Add Package
npx jsr add @hikyu/log
Import symbol
import * as log from "@hikyu/log";
Add Package
bunx jsr add @hikyu/log
Import symbol
import * as log from "@hikyu/log";