New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@4a/asp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@4a/asp

color log, 染色日志

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

asp

染色日志,推荐配合 iTerm 使用,非标准日志模块,方便日志聚焦

Install

npm i @4a/asp
pnpm add @4a/asp

Usage

import asp from '@4a/asp'
// or
import { asp, Asp } from '@4a/asp'
asp.gray('message', { app: '@4a/asp' })
asp.log('message', { app: '@4a/asp' })
asp.info('message', { app: '@4a/asp' })
asp.debug('message', { app: '@4a/asp' })
asp.warn('message', { app: '@4a/asp' })
asp.error('message', { app: '@4a/asp' })

// pretty once
asp.pretty().error('message', { app: '@4a/asp' })

Preview

@4a/asp:preview

class Asp

// pretty anywhere
const asp = new Asp({ pretty: true })

Level

分级显示

Level=0 node app.js # only error
Level=1 node app.js # warn, error
Level=2 node app.js # info, warn, error
Level=3 node app.js # debug, info, warn, error
Level=4 node app.js # log, debug, info, warn, error
Level=5 node app.js # all

level

enum Level {
  error,
  warn,
  debug,
  info,
  log,
  gray,
}

Example

node example/demo.js

Keywords

FAQs

Package last updated on 20 Jul 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc