logentries-retrieving-log
v1.0.0
Published
Retrieve logs from logentries.com. Unoffical.
Downloads
4
Maintainers
Readme
logentries-retrieving-log
Retrieve logs from logentries.com
. Unofficial.
Install
$ npm install --save logentries-retrieving-log
Usage
var LogentriesRetrievingLog = require('logentries-retrieving-log');
var retriever = new LogentriesRetrievingLog({accountKey: '__YOUR_KEY__', logAddr: '__LOG_ADDR__'});
retriever.getLogs({limit: 10}, function(err, response, body){
body.split("\n");
//#=> [
// "145 <45>1 2014-12-16T13:00:45.518543+00:00 heroku api - - Add logentries:tryit add-on by [email protected]",
// "137 <45>1 2014-12-16T13:00:45.518543+00:00 heroku api - - Release v11 created by [email protected]",
// "129 <45>1 2014-12-16T13:00:46.043594+00:00 heroku web.1 - - State changed from up to starting",
// "131 <45>1 2014-12-16T13:00:48.084480+00:00 heroku web.1 - - Stopping all processes with SIGTERM",
// "124 <45>1 2014-12-16T13:00:49.345190+00:00 heroku web.1 - - Process exited with status 0",
// "155 <45>1 2014-12-16T13:00:51.140262+00:00 heroku web.1 - - Starting process with command `bin/hubot -a slack -n hubot`",
// "134 <190>1 2014-12-16T13:00:56.108557+00:00 app web.1 - - [email protected] node_modules/coffeelint",
// "117 <190>1 2014-12-16T13:00:56.108575+00:00 app web.1 - - ├── [email protected]",
// "117 <190>1 2014-12-16T13:00:56.108577+00:00 app web.1 - - ├── [email protected]",
// "152 <190>1 2014-12-16T13:00:56.108578+00:00 app web.1 - - ├── [email protected] ([email protected], [email protected])",
// ""
// ]
});
API
LogentriesRetrievingLog.getLogs([options])
You can set start
, end
, filter
and limit
. See below logentries' document.
Documentation for Logentries
Contributing
Welcome.
License
Copyright (c) 2014 sanemat. Licensed under the MIT license.