AppenderGmail {lgrExtra} | R Documentation |
Send emails via the Gmail REST API
Description
Send mails via gmailr::gm_send_message()
. This
Appender keeps an in-memory buffer like AppenderBuffer. If the buffer is
flushed, usually because an event of specified magnitude is encountered, all
buffered events are concatenated to a single message. The default behavior
is to push the last 30 log events in case a fatal
event is encountered.
NOTE: This Appender requires that you set up google API authorization, please refer to the documentation of gmailr for details.
Value
The $new()
method returns an R6::R6 that inherits from
lgr::Appender and can be uses as an appender by a lgr::Logger.
Super classes
lgr::Filterable
-> lgr::Appender
-> lgr::AppenderMemory
-> lgrExtra::AppenderDigest
-> lgrExtra::AppenderMail
-> AppenderGmail
Methods
Public methods
Inherited methods
lgr::Filterable$add_filter()
lgr::Filterable$filter()
lgr::Filterable$remove_filter()
lgr::Filterable$set_filters()
lgr::Appender$set_layout()
lgr::Appender$set_threshold()
lgr::AppenderMemory$append()
lgr::AppenderMemory$clear()
lgr::AppenderMemory$set_buffer_size()
lgr::AppenderMemory$set_flush_on_exit()
lgr::AppenderMemory$set_flush_on_rotate()
lgr::AppenderMemory$set_flush_threshold()
lgr::AppenderMemory$set_should_flush()
lgr::AppenderMemory$show()
lgrExtra::AppenderDigest$set_subject_layout()
lgrExtra::AppenderMail$format()
lgrExtra::AppenderMail$set_bcc()
lgrExtra::AppenderMail$set_cc()
lgrExtra::AppenderMail$set_from()
lgrExtra::AppenderMail$set_html()
lgrExtra::AppenderMail$set_to()
Method new()
see AppenderMail for details
Usage
AppenderGmail$new( to, threshold = NA_integer_, flush_threshold = "fatal", layout = LayoutFormat$new(fmt = "%L [%t] %m %f", timestamp_fmt = "%H:%M:%S"), subject_layout = LayoutFormat$new(fmt = "[LGR] %L: %m"), buffer_size = 30, from = get_user(), cc = NULL, bcc = NULL, html = FALSE, filters = NULL )
Method flush()
Usage
AppenderGmail$flush()
See Also
Other Appenders:
AppenderDbi
,
AppenderDt
,
AppenderElasticSearch
,
AppenderPushbullet
,
AppenderSendmail
,
AppenderSyslog