 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences namespaces words assocs logging sorting
 prettyprint io io.styles io.files io.encodings.utf8
-strings combinators
+strings combinators accessors arrays
 logging.server logging.parser calendar.format ;
 IN: logging.analysis
 

    "==== INTERESTING MESSAGES:" print nl
    "Total: " write dup values sum . nl
    [
        dup second write ": " write third "\n" join write
    ] histogram.
    nl
    "==== WORDS:" print nl

: log-entry. ( entry -- )
    "====== " write
    {
        [ date>> (timestamp>string) bl ]
        [ level>> pprint bl ]
        [ word-name>> write nl ]
        [ message>> "\n" join print ]
    } cleave ;

: errors. ( errors -- )
