Skip to content

Clean Logs  #97

@burdettadam

Description

@burdettadam

Logs currently have 5 columns of information displayed. The first 4 are redundant and ignored by most users. one line example
INFO <functionName/eventType>
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions