New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bluesyoung/logger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bluesyoung/logger

log format

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

基于 consola 包装的日志格式化库

安装

npm i @bluesyoung/logger
yarn add @bluesyoung/logger
pnpm add @bluesyoung/logger

使用

import { useYoungLogger } from '@bluesyoung/logger';

// 默认劫持 console
const { logger, consola } = useYoungLogger();

日志等级配置

# 通过环境变量配置

# 只展示 error
CONSOLA_LEVEL=0

# 展示 error + warn
CONSOLA_LEVEL=1

# 展示 error + warn + log
CONSOLA_LEVEL=2

# 展示 error + warn + log + info(默认)
CONSOLA_LEVEL=3

# 展示 error + warn + log + info + debug
CONSOLA_LEVEL=4

# 展示 error + warn + log + info + debug + trace
CONSOLA_LEVEL=5

Keywords

logger

FAQs

Package last updated on 25 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts