ryapric / loggit

Modern Logging for the R Ecosystem
Other
37 stars 2 forks source link

Change logging behavior to ndjson #7

Closed ryapric closed 4 years ago

ryapric commented 4 years ago

The way loggit works now is incredibly non-performant: in order to write a log entry, it must first read in the entire log file, append to the data.frame representation, and then write the whole thing back out. Switching to ndjson will retain the JSON format, but allow for separation of concerns on a line-by-line basis. This will make writes negligibly fast, and infinitely scalable (up to available disk space).

ryapric commented 4 years ago

Done, by way of write_ndjson().