allow HumanReadableLogs to accept an already parsed log

This commit is contained in:
Brian Gough 2016-07-27 16:51:13 +01:00
parent e99176c0d0
commit d4c5028350

View file

@ -3,7 +3,10 @@ define [
"ide/human-readable-logs/HumanReadableLogsRules"
], (LogParser, ruleset) ->
parse : (rawLog, options) ->
parsedLogEntries = LogParser.parse(rawLog, options)
if typeof rawLog is 'string'
parsedLogEntries = LogParser.parse(rawLog, options)
else
parsedLogEntries = rawLog
_getRule = (logMessage) ->
return rule for rule in ruleset when rule.regexToMatch.test logMessage