Socket
Socket
Sign inDemoInstall

cc-debug

Package Overview
Dependencies
2
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cc-debug

replace tj's debug,log to log.io


Version published
Maintainers
1
Install size
2.12 MB
Created

Readme

Source

cc-debug

替换 tj 的 debug module,向 log.io 输出日志

使用

1. 其他用debug的第三方库

例如 var debug = require('debug')("express") 这个level定为 debug

1.1 File: express.log , 传送最低level为warn

1.2 Log.io , node名称全局配置,生存一个叫 express 的stream,传送最低level为 debug

1.3 debug 不走console了

2. console 消息

我把 winston 这个默认的logger绑定到console上面,可以使用 console.warn,console.debug ...

console.log

1. 输出到控制台

2. 输出到winston,level为debug

    1. 文件 console.log

    2. log.io stream name : console_msg

3. 自己用

3.1 同第三方库那样,我们自己的namespace

3.2 console.xxx


config

参照demo/config/default.js 配置


winston 默认 levels { silly: 0, debug: 1, verbose: 2, info: 3, warn: 4, error: 5 }

Keywords

FAQs

Last updated on 11 Dec 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc