A very simple and easy-to-use set of suspiciously-familiar functions. 'loggit' provides a set of wrappings for base R's message(), warning(), and stop() functions that maintain identical functionality, but also log the handler message to a 'JSON' log file. While mostly automatic, powerful custom logging is available via these handlers' logging function, loggit(), which is also exported for use. No change in existing code is necessary to use this package.
Automatically coerce any entries for 'log_lvl' and 'log_msg' fields to be character,.
(Github-only): loggit() no longer allows for a data frame to be passed as an argument; the underlying code was not writen very well, and I got ahead of myself in throwing it in there. loggit() is, however, still vectorized by nature, so users can still pass vectors to, for example, the log_detail argument, and values will be recycled according to R's usual recycling rules.
Add get_logs(), which returns a data frame of a provided log file. Returns the current log file by default.
(Github-only): loggit() now allows for a data frame to be passed as the sole argument, and have its results be logged. Required column names are the same as the first two arguments to loggit(): "log_lvl" and "log_msg". Any additional number of columns can be supplied.