Skip to content

zuojj/zloger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZLoger

Latest NPM release TravisCI Build Status Test Coverage Code Climate

A front-end log and exception statistical system

REFERENCE

<head>
    <script src="zloger.js"></script>
</head>

USE

window.onerror

window.onerror = window.ZLoger.error.bind(window.ZLoger);

img.onerror / script.onerror

<img src="error.png" onerror="ZLoger.error(event)">
or
imgObj.addEventListener('error', ZLoger.error, false);
imgObj.attachEvent('onerror', ZLoger.error);

directly use send

ZLoger.send('http://aa.xx.com/pv.gif?', {
    ip: '10.1.1.1'
}, 1);
or
ZLoger.send('http://aa.xx.com/pv.gif?name=benjamin', {
    ip: '10.1.1.1'
}, 0.3);

directly use reporter

ZLoger.reporter('https://www.xxx.com/pv.gif?a=c&ip=10.10.1.2', function(url) {
    console.log(url);
});

About

A front-end log and exception statistical frameset

Resources

Stars

Watchers

Forks

Packages

No packages published