mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
invoke log util, console.log can be switched off
This commit is contained in:
17
lib/log.js
Normal file
17
lib/log.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var ifPrint = true;
|
||||
|
||||
function setPrintStatus(status){
|
||||
ifPrint = !!status;
|
||||
}
|
||||
|
||||
function printLog(content,type){
|
||||
if(!ifPrint) return;
|
||||
|
||||
var tip = content;
|
||||
console.log(tip);
|
||||
}
|
||||
|
||||
module.exports.printLog = printLog;
|
||||
module.exports.setPrintStatus = setPrintStatus;
|
||||
module.exports.T_TIP = 0;
|
||||
module.exports.T_ERR = 1;
|
||||
Reference in New Issue
Block a user