Create a log entry from outpack. This can be used to either log at
the packet level (in which case object
should be a packet
object) or root level (in which case pass a root). What is
actually printed to the screen or log files depends on the
thresholds and settings in the root and console. The functions
outpack_log_info
, outpack_log_debug
and outpack_log_traceare convenience wrappers around
outpack_log` and should be preferred.
outpack_log(object, log_level, topic, detail, caller)
outpack_log_info(object, topic, detail, caller)
outpack_log_debug(object, topic, detail, caller)
outpack_log_trace(object, topic, detail, caller)
Either an outpack_packet
or outpack_root
object;
anything else is an error for now.
A log level; one of info
, debug
or trace
in
increasing order of verbosity (trace
being a superset of
debug
, which is a superset of info
). There is no warning
or error
log level
A short string (less than 10 characters) as the title of the action.
A character vector of any length to be used as
detail for the logs. If you provide a single string this will
be unboxed in the final JSON. If you want to force an array of
strings, use I()
around the value here (see
jsonlite::toJSON's documentation on auto_unbox
)
The name of the calling function; include the package name here.
Nothing, this is called for its side effects