Picolab / devtools

Repository for KRL Developer Tools
MIT License
6 stars 4 forks source link

Clean Logs #97

Open burdettadam opened 8 years ago

burdettadam commented 8 years ago

Logs currently have 5 columns of information displayed. The first 4 are redundant and ignored by most users. one line example

INFO 152954053 INFO b507199x1.dev installedRulesets _api:ruleset Logs would be easier to read if we only put the time stamp, rid and function name / event type on the main tab label and display relevant information when tab is selected. A for loop to clean up logs could look like this, for (var i = 0; i < response.length; i++) {// for each log for (var k = 0; k < response[i].log_items.length; k++) { // for each logged item response[i].log_items[k] = _.rest(response[i].log_items[k].split(/\s+/),5); //cut off first 4 col response[i].log_items[k] = response[i].log_items[k].join(' '); // join last columns back together } } note: I'm using underscore library in the example above to get the last of an array.