The requests of a server log as the request maps that dk.simongray.podcast.analytics counts downloads from.
It reads two formats:
The requests come one line at a time, so a log of any size can be read from line-seq. A line that doesn't read gives a map with a diagnostic under :error, which analytics/downloads leaves out as malformed.
The requests of a server log as the request maps that dk.simongray.podcast.analytics counts downloads from. It reads two formats: - the combined format of Apache and nginx, and the common format, which lacks the referer and the user agent of the combined one - the extended format of the W3C, whose #Fields line names its fields, e.g. the logs of IIS and of some CDNs The requests come one line at a time, so a log of any size can be read from line-seq. A line that doesn't read gives a map with a diagnostic under :error, which analytics/downloads leaves out as malformed.
(requests lines)(requests lines {fmt :format :as opts})The request maps of the lines of a server log, read by the opts
below, as a lazy sequence in the order of the lines.
A line that doesn't read gives a map with an :analytics/unreadable-line
diagnostic under :error, which names the :line, counted from 1. Blank
lines and the directives of the W3C format give nothing. A request
takes the first address of X-Forwarded-For as its :ip when the log has
one, as the IAB asks. The opts are these:
The request maps of the `lines` of a server log, read by the `opts` below, as a lazy sequence in the order of the lines. A line that doesn't read gives a map with an :analytics/unreadable-line diagnostic under :error, which names the :line, counted from 1. Blank lines and the directives of the W3C format give nothing. A request takes the first address of X-Forwarded-For as its :ip when the log has one, as the IAB asks. The `opts` are these: - :format, :combined or :w3c, by default the W3C format when the first line that isn't blank is a directive, e.g. #Version: 1.0 - :base-url, the URL that a path of a request is relative to, e.g. https://cdn.example.com/. Without it, the :url is the target of the request as the log has it, most often a path. - :extra, the names of the quoted fields that the combined format of the host adds after the user agent, in their order. Those that count are :forwarded-for and :range, e.g. [:forwarded-for] for nginx with "$http_x_forwarded_for" at the end of the format.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |