% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hooks.R
\name{log_warnings}
\alias{log_warnings}
\title{Injects a logger call to standard warnings}
\usage{
log_warnings(muffle = getOption("logger_muffle_warnings", FALSE))
}
\arguments{
\item{muffle}{if TRUE, the warning is not shown after being logged}
}
\description{
This function sets a hook to trigger \code{\link[=log_warn]{log_warn()}} when \code{warning} is called
to log the warning messages with the global \code{logger} layout and appender.
}
\examples{
\dontrun{
log_warnings()
for (i in 1:5) {
  Sys.sleep(runif(1))
  warning(i)
}
}
}
