Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Log filter app #409

Merged
merged 2 commits into from

2 participants

@blakmatrix

Adresses customer issues and seperates out app logs where loggly does not.

@blakmatrix

adresses #406

@mmalecki

Too drunk to actually review but looks good to me

@blakmatrix blakmatrix merged commit 6170ebc into master
@blakmatrix blakmatrix deleted the log-filter-app branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/jitsu/commands/logs.js
View
7 lib/jitsu/commands/logs.js
@@ -179,6 +179,11 @@ function putLogs (results, appName, amount, showApp) { //TODO: utilize amount an
showApp = args[3] || null;
}
+ if(appName.indexOf('/') !== -1){
+ //username = appName.split('/')[0];
+ appName = appName.split('/')[1];
+ }
+
results.data = results.data.filter(function (item) {
return item.json && item.json.hasOwnProperty('message');
});
@@ -195,7 +200,7 @@ function putLogs (results, appName, amount, showApp) { //TODO: utilize amount an
}
results.data.sort(sort).forEach(function (datum) {
- if (datum.json && datum.json.message != null) {
+ if (datum.json && datum.json.message !== null && datum.json.app !== null && RegExp('^' + appName + '$').test(datum.json.app)) {
// '[' + datum.json.app.magenta + ']
datum.json.message.split('\n').forEach(function (line) {
var now = new Date(datum.timestamp);
Something went wrong with that request. Please try again.