Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

appcan-logger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appcan-logger

日志操作

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

logger

简单的日志操作

安装部署

npm install appcan-logger

使用

var logger = require("appcan-logger")('[app]'); logger.error('hello world'); logger.warn('hello world'); logger.info('hello world'); logger.log('hello world');

##日志等级 'all', 'debug', 'info', 'warn', 'error', 'fatal', 'off' 分别对应着1-7等级

设置日志等级(只对设置后的日志起作用) require("appcan-logger").setLevel(4);

清空日志(所有日志不输出,只对设置后的日志起作用) require("appcan-logger").clear();

推荐使用等级
'debug', 'info', 'warn', 'error'

默认debug等级

Keywords

node

FAQs

Package last updated on 25 Dec 2015

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