Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yog-log

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-log - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

1

index.js

@@ -449,2 +449,3 @@ var fs = require('fs'),

//mail("生成日志模板js失败");
return false;
}

@@ -451,0 +452,0 @@ }

2

package.json
{
"name": "yog-log",
"version": "0.1.6",
"version": "0.1.7",
"description": "yog logger",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -75,3 +75,3 @@ # Node Log 统计方案

默认的`format_wf `:
%L: %{%m-%d %H:%M:%S}t %{app}x * %{pid}x [logid=%l filename=%f lineno=%N errno=%{err_no}x %{encoded_str_array}x errmsg=%{u_err_msg}x]
%L: %{%m-%d %H:%M:%S}t %{app}x * %{pid}x [logid=%l filename=%f lineno=%N errno=%{err_no}x %{encoded_str_array}x errmsg=%{u_err_msg}x]

@@ -88,3 +88,3 @@ ```

| TRACE | 8 | 打印FATAL、WARNING、NOTICE、TRACE(线上程序异常时使用该配置)|
| DEBUG | 16 | 打印FATAL、WARNING、NOTICE、TRACE、DEBUG(测试环境配 |
| DEBUG | 16 | 打印FATAL、WARNING、NOTICE、TRACE、DEBUG(测试环境配 |

@@ -94,3 +94,3 @@ ## response.emit(name,obj,level)

在router层使用emit方式可以避免每个文件都引入logger和获取实例。参数说明:
- name :日志事件名称,固定为'log'

@@ -103,3 +103,3 @@ - obj: string或者object格式。如果是string,认为是错误消息。如果是object,请认为是详细信息。正确格式为{'stack':e,'msg':'msg','errno':'010'},分别代表`错误堆栈`、`错误消息`、`错误码`。错误消息如果不填将使用错误堆栈的消息。

```javascript
res.emit('log',{'stack':e,'errno':120,'msg' :'error happened!'},'warning');
res.emit('log',{'stack':e,'errno':120,'msg' :'error happened!'},'warning');
```

@@ -138,3 +138,3 @@

'custom':{'key1' :'value1','key2':'value2'} //自定义消息
});
});

@@ -148,3 +148,3 @@ //其他地方

});
```

@@ -208,7 +208,1 @@ `注意`custom字段默认只会在`warning`和`fatal`日志中展现

单元测试说明详见[此文档](./test/README.md)
## 联系我们
邮件组: oak@baidu.com
联系人: zhangtao07@baidu.com、wangcheng@biadu.com
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