]> gitweb.factorcode.org Git - factor.git/blob - basis/logging/analysis/analysis-docs.factor
factor: trim using lists
[factor.git] / basis / logging / analysis / analysis-docs.factor
1 USING: help.markup help.syntax assocs logging ;
2 IN: logging.analysis
3
4 HELP: analyze-entries
5 { $values { "entries" "a sequence of log entries" } { "word-names" "a sequence of strings" } { "errors" "a sequence of log entries" } { "word-histogram" assoc } { "message-histogram" assoc } }
6 { $description "Analyzes log entries:"
7     { $list
8         { "Errors (entries with level " { $link ERROR } " or " { $link CRITICAL } ") are collected into the " { $snippet "errors" } " sequence." }
9         { "All logging words are tallied into " { $snippet "word-histogram" } " - for example, this can tell you about HTTP server hit counts." }
10         { "All words listed in " { $snippet "word-names" } " have their messages tallied into " { $snippet "message-histogram" } " - for example, this can tell you about popular URLs on an HTTP server." }
11     }
12 } ;
13
14 HELP: analysis.
15 { $values { "errors" "a sequence of log entries" } { "word-histogram" assoc } { "message-histogram" assoc } }
16 { $description "Prints a logging report output by " { $link analyze-entries } ". Formatted output words are used, so the report looks nice in the UI or if sent to an HTML stream." } ;
17
18 HELP: analyze-log
19 { $values { "lines" "a parsed log file" } { "word-names" "a sequence of strings" } }
20 { $description "Analyzes a log file and prints a formatted report. The " { $snippet "word-names" } " parameter is documented in " { $link analyze-entries } "." } ;
21
22 ARTICLE: "logging.analysis" "Log analysis"
23 "The " { $vocab-link "logging.analysis" } " vocabulary builds on the " { $vocab-link "logging.parser" } " vocabulary. It parses log files and produces formatted summary reports. It is used by the " { $vocab-link "logging.insomniac" } " vocabulary to e-mail daily reports."
24 $nl
25 "Print log file summary:"
26 { $subsections analyze-log }
27 "Factors:"
28 { $subsections
29     analyze-entries
30     analysis.
31 } ;
32
33 ABOUT: "logging.analysis"