Learn R Programming

sits (version 1.1.0)

sits_debug_log: sits log functions

Description

.sits_debug_log: (internal) logs to a CSV file the following values:

  • date_time: event date and time

  • pid: process identifier

  • event: event name

  • elapsed_time: duration (in seconds) from the last log call

  • mem_used: session used memory (in MB)

  • max_mem_used: maximum memory used (in MB) from first log call

  • tag: any character string to be registered

Each event will be logged in one row in the log file. The log file name will be the same as the base name of the current session's temporary directory.

.sits_debug: When called without parameters retrieves the current debug flag value. The sits write log files when the debug flag is TRUE

Usage

.sits_debug_log(output_dir = ".", event = "", key = "", value = "")

.sits_debug(flag = NULL)

Value

A logical value with current debug flag

Arguments

output_dir

Output directory to write log file

event

The name of the event to be logged

key

A key describing the value.

value

Any value to be logged. The value will be converted to string and escaped.

flag

A logical value to set the debug flag

Author

Rolf Simoes, rolf.simoes@inpe.br