Handbook
Glossary
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
errors
a sequence of log entries
word-histogram
an
assoc
message-histogram
an
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
USING:
accessors
assocs
io
kernel
prettyprint
sequences
splitting
;
IN:
logging.analysis
:
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.
;