This is a fairly standard format for log files - it uses both quotes and square brackets for quoting, and there may be literal quotes embedded in a quoted string. The dash, "-", is used for missing values.
read_log(file, col_names = FALSE, col_types = NULL, skip = 0, n_max = Inf, progress = show_progress())
Either a path to a file, a connection, or literal data (either a single string or a raw vector).
Files ending in
Literal data is most useful for examples and tests. It must contain at least one new line to be recognised as data (instead of a path) or be a vector of greater than length 1.
Using a value of
Alternatively, you can use a compact string representation where each
character represents one column:
c = character, i = integer, n = number, d = double,
l = logical, D = date, T = date time, t = time, ? = guess, or
Number of lines to skip before reading data.
Maximum number of records to read.
Display a progress bar? By default it will only display
in an interactive session and not while knitting a document. The display
is updated every 50,000 values and will only display if estimated reading
time is 5 seconds or more. The automatic progress bar can be disabled by
read_log(readr_example("example.log"))#>#> #> #> #> #> #> #> #> #>#> # A tibble: 2 x 7 #> X1 X2 X3 X4 X5 X6 X7 #> <chr> <lgl> <chr> <chr> <chr> <dbl> <dbl> #> 1 172.21.13.45 NA "Microsoft\\JohnDoe" 08/Apr/20… GET /scripts/… 200 3401 #> 2 127.0.0.1 NA frank 10/Oct/20… GET /apache_p… 200 2326