You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cc-debug

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cc-debug

replace tj's debug,log to log.io

0.0.11
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

cc

FAQs

Package last updated on 11 Dec 2014

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