% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Appender.R \name{AppenderConsole} \alias{AppenderConsole} \title{Log to the console} \description{ An Appender that outputs to the \R console. If you have the package \strong{crayon} installed log levels will be coloured by default (but you can modify this behaviour by passing a custom \link{Layout}). } \examples{ # create a new logger with propagate = FALSE to prevent routing to the root # logger. Please look at the section "Logger Hirarchies" in the package # vignette for more info. lg <- get_logger("test")$set_propagate(FALSE) lg$add_appender(AppenderConsole$new()) lg$add_appender(AppenderConsole$new( layout = LayoutFormat$new("[\%t] \%c(): [\%n] \%m", colors = getOption("lgr.colors")))) # Will output the message twice because we attached two console appenders lg$warn("A test message") lg$config(NULL) # reset config } \seealso{ \link{LayoutFormat} Other Appenders: \code{\link{Appender}}, \code{\link{AppenderBuffer}}, \code{\link{AppenderFile}}, \code{\link{AppenderFileRotating}}, \code{\link{AppenderFileRotatingDate}}, \code{\link{AppenderFileRotatingTime}}, \code{\link{AppenderTable}} } \concept{Appenders} \section{Super classes}{ \code{\link[lgr:Filterable]{lgr::Filterable}} -> \code{\link[lgr:Appender]{lgr::Appender}} -> \code{AppenderConsole} } \section{Methods}{ \subsection{Public methods}{ \itemize{ \item \href{#method-AppenderConsole-new}{\code{AppenderConsole$new()}} \item \href{#method-AppenderConsole-append}{\code{AppenderConsole$append()}} \item \href{#method-AppenderConsole-set_connection}{\code{AppenderConsole$set_connection()}} } } \if{html}{\out{ }} \if{html}{\out{