event: Log a new event

View source: R/helper.R

eventR Documentation

Log a new event

Description

Logs useful information as the analysis progresses. May be called to abort the run if type includes "stop"

Usage

event(..., type, tag)

Arguments

...

The text fragments that compose the event message.

type

A vector with one of more of several options:

  • 'crash' special case to be used only together with on.exit(). Meant to capture function failures not expressly handled by our coded stops.

  • 'stop' appends the message to temp_log.txt then stops the execution.

  • 'warning' appends the message to temp_warnings.txt,

  • 'screen' displays the message on screen,

  • 'report' appends the message to temp_log.txt,

  • 'ud' appends the message to temp_UD.txt,

  • 'comment' appends the message to temp_comments.txt,

  • 'debug' appends the message only to the debug log. NOTE: does not have to be explicitly called; everything goes into the debug log. Use when you only want the event to be logged in as debug.

The same message may be appended to multiple types at once. Preferred order is "stop", "warning", "screen", "report".

tag

Only relevant one 'comment' is one of the types. Put the transmitter ID here so the comment is attached to the right animal.

Value

No return value, called for side effects.


hugomflavio/actel documentation built on Dec. 16, 2024, 1:16 p.m.