read_clf: read CLF-formatted logs

Description Usage Arguments Details Value See Also Examples

View source: R/readers.R

Description

Read a file of request logs stored in the Common Log Format.

Usage

1
read_clf(file, has_header = FALSE)

Arguments

file

the full path to the CLF-formatted file you want to read.

has_header

whether or not the file has a header row. Set to FALSE by default.

Details

the CLF is a standardised format for web request logs. It consists of the fields:

While outdated as a standard, systems using the CLF are still around; the Squid caching system, for example, uses the CLF as one of its default log formats (the other, the squid "native" format, can be read with read_squid).

Value

a data.frame consisting of seven fields, as discussed above, with normalised timestamps.

See Also

read_combined for the /Combined/ Log Format, and split_clf for splitting out the "requests" field.

Examples

1
2
#Read in an example CLF-formatted file provided with the webreadr package.
data <- read_clf(system.file("extdata/log.clf", package = "webreadr"))

isomorphisms/webreadr documentation built on May 18, 2019, 5:51 a.m.