Skip to main content
Home

@hikyu/log@0.2.0

latest

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
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
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.

Examples

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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@hikyu/log

Import symbol

import * as log from "@hikyu/log";
or

Import directly with a jsr specifier

import * as log from "jsr:@hikyu/log";

Add Package

pnpm i jsr:@hikyu/log
or (using pnpm 10.8 or older)
pnpm dlx jsr add @hikyu/log

Import symbol

import * as log from "@hikyu/log";

Add Package

yarn add jsr:@hikyu/log
or (using Yarn 4.8 or older)
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";