analysis. ( errors word-histogram message-histogram -- )
Furnace framework » Logging framework » Log analysis

Prev:analyze-entries ( entries word-names -- errors word-histogram message-histogram )


Vocabulary
logging.analysis

Inputs
errorsa sequence of log entries
word-histograman assoc
message-histograman assoc


Outputs
None

Word description
Prints a logging report output by analyze-entries. Formatted output words are used, so the report looks nice in the UI or if sent to an HTML stream.

Definition


: analysis. ( errors word-histogram message-histogram -- )
nl "==== FREQUENT MESSAGES:" print nl "Total: " write
dup sum-values . nl [
[ first name>> write bl ] [ second write ": " write ]
[ third join-lines write ] tri
] histogram. nl nl "==== FREQUENT WORDS:" print nl
[ write ] histogram. nl nl "==== ERRORS:" print nl errors. ;