AppenderGmail: Send emails via the Gmail REST API

AppenderGmailR 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

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

LayoutFormat, LayoutGlue

Other Appenders: AppenderDbi, AppenderDt, AppenderElasticSearch, AppenderPushbullet, AppenderSendmail, AppenderSyslog


s-fleck/lgr.app documentation built on Jan. 12, 2023, 8:03 p.m.