imweb-badjs
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -1,6 +0,3 @@ | ||
/** | ||
* Created by liuherbert on 13-12-15. | ||
*/ | ||
#!/usr/bin/env node | ||
'use strict' | ||
module.exports = require('./lib/badjs'); | ||
var imwebBadjs; | ||
module.exports = imwebBadjs; |
{ | ||
"name": "imweb-badjs", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "report with badjs based on simple!", | ||
@@ -18,5 +18,3 @@ "main": "index.js", | ||
], | ||
"author": { | ||
"name": "herbertliu" | ||
}, | ||
"author": "herbertliu <herbertliuhb@gmail.com>", | ||
"license": "\"report error message with badjs\"", | ||
@@ -27,11 +25,11 @@ "bugs": { | ||
"homepage": "https://github.com/herbertliuhb/badjs", | ||
"_id": "imweb-badjs@0.2.2", | ||
"_id": "imweb-badjs@0.2.3", | ||
"dist": { | ||
"shasum": "6375be4bf0c9195a1c619edd13d4ae878e3fecdb", | ||
"tarball": "http://registry.npmjs.org/imweb-badjs/-/imweb-badjs-0.2.0.tgz" | ||
"shasum": "ce07f48b18cfe58cc6817fe4ac002bdc7dfe874e", | ||
"tarball": "http://registry.npmjs.org/imweb-badjs/-/imweb-badjs-0.2.3.tgz" | ||
}, | ||
"_from": "imweb-badjs@", | ||
"_resolved": "https://registry.npmjs.org/imweb-badjs/-/imweb-badjs-0.2.0.tgz", | ||
"_shasum": "1fe84ca3448da5c0a624b04bb575452ce779dcdd", | ||
"_npmVersion": "1.4.9", | ||
"_resolved": "https://registry.npmjs.org/imweb-badjs/-/imweb-badjs-0.2.3.tgz", | ||
"_shasum": "ce07f48b18cfe58cc6817fe4ac002bdc7dfe874e", | ||
"_npmVersion": "1.4.28", | ||
"_npmUser": { | ||
@@ -48,3 +46,13 @@ "name": "herbertliu", | ||
"directories": {}, | ||
"readme": "ERROR: No README data found!" | ||
"licenses": "MIT", | ||
"lego": { | ||
"category" : "6", | ||
"categoryName" : "日志", | ||
"main": "index.js", | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"expect.js": "0.3.1" | ||
} | ||
} | ||
} |
Simple | ||
# imweb-badjs [![lego version](http://lego.oa.com:80/badge/imweb-badjs)](http://lego.oa.com:80/package/imweb-badjs) | ||
--- | ||
imweb badjs log | ||
## Install | ||
``` | ||
$ lego install imweb-badjs --save | ||
``` | ||
## Usage | ||
```js | ||
var imwebBadjs = require('imweb-badjs'); | ||
// use imwebBadjs | ||
``` | ||
##Api | ||
================ | ||
* @author herbertliu | ||
* @date 2013-02-25 version 0.2.3 | ||
* @description badjs上报 | ||
* @param msg {String} 上报错误信息 | ||
* @param url {String} 该上报信息所属的文件路径 | ||
* @param line {Number} 上报信息所属的文件行号,没有为0 | ||
* @param smid {Number} 上报对应的monitor id,如果smid ===0 ,则只统计badjs,不上报monitor;如果没有该参数,则上报通用monitor id;如果smid === -1,window.onerror专用,会增加Script Error字段头 | ||
* @param level {Number} 上报对应的级别 1 => debug(调试日志); 2 = > info(流水日志); 4 => error(错误日志)(默认值) ; 8 => fail(致命错误日志) | ||
* @example Badjs.init(bid,mid,min) 初始化badjs一些参数,mid,默认的业务上报Monitor id,min 是否上报浏览器简化信息;或者Badjs.init(bid,{'1' : 0,'2' : 0,'4' : 0, '8' : 0},min) | ||
* @example Badjs(msg,url,line,smid,level,min) badjs上报,上报字符串,地址,行号,Monitor属性id(可为空,即不报Monitor),上报级别;min,是否上报简略信息 | ||
* @description badjs�ϱ� | ||
* @param msg {String} �ϱ�������Ϣ | ||
* @param url {String} ���ϱ���Ϣ�������ļ�·�� | ||
* @param line {Number} �ϱ���Ϣ�������ļ��кţ�û��Ϊ0 | ||
* @param smid {Number} �ϱ���Ӧ��monitor id,���smid ===0 ,��ֻͳ��badjs,���ϱ�monitor;���û�иò��������ϱ�ͨ��monitor id;���smid === -1��window.onerrorר�ã�������Script Error�ֶ�ͷ | ||
* @param level {Number} �ϱ���Ӧ�ļ��� 1 => debug��������־��; 2 = > info����ˮ��־��; 4 => error��������־����Ĭ��ֵ�� ; 8 => fail������������־�� | ||
* @example Badjs.init(bid,mid,min) ��ʼ��badjsһЩ����,mid,Ĭ�ϵ�ҵ���ϱ�Monitor id,min �Ƿ��ϱ����������Ϣ;����Badjs.init(bid,{'1' : 0,'2' : 0,'4' : 0, '8' : 0},min) | ||
* @example Badjs(msg,url,line,smid,level,min) badjs�ϱ����ϱ��ַ�������ַ���кţ�Monitor����id(��Ϊ�գ�������Monitor)���ϱ�����;min,�Ƿ��ϱ�������Ϣ | ||
8470
6
35
112