edbLog: Write an operation "log" (used when modifying the database)

Description Usage Arguments Author(s) See Also

Description

Write an operation "log" (to be used when modifying the

database). An operation log consists in information about (a) the function

used, (b) the table modified, (c) the operation date, (d) R version, (e)

easydb version, (f) the option useds ('mode' and 'getKey' if used with

edbWrite()). This is not version control, and this is not comprehensive

operation log.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
edbLog(edb, tableName = as.character(NA), fun = as.character(NA), 


    date = date(), R.version = R.version.string, nodename = Sys.info()[["nodename"]], 


    edbVersion = NULL, mode = as.character(NA), getKey = as.character(NA), 


    logRandId = rnorm(1), logMsg = as.character(NA), 


    logTableName = "edbLog", logCreateTableIfNotExist = TRUE)

Arguments

edb

An object of class 'edb', such as returned by edb.

Database in which the log has to be written.

tableName

Single character string. The name of the table that was modified.

Not to be confused with 'logTableName'.

fun

Single character string. The name of the function that did the modification.

date

Single character string. The date and time of the operation.

R.version

Single character string. R version

nodename

Single character string. Name of the computer (node).

edbVersion

Single character string. Version of easydb. If NULL, the version is

fetched using 'installed.packages()'.

mode

Single character string. Value of the argument 'mode', if fun is

edbWrite().

getKey

Single character string. Value of the argument 'getKey', if fun is

edbWrite().

logRandId

Single numerical. Some number, hopefully unique, that can be used

to identify the log record, as a complement to the log date.

logMsg

Single character string. Aditional log message to be written in the

log table (same record as the rest).

logTableName

Single character string. Name of the log table. If that table does not

exist, it will be created.

logCreateTableIfNotExist

Single logical. If TRUE (the default), then the table is created if it

does not exist yet. Please notice that this option is not multi-thread

safe.

Author(s)

Julien MOEYS <Julien.Moeys@mark.slu.se>

See Also

edb, edbWrite, edbDelete,

edbDrop.


easydb documentation built on May 2, 2019, 4:47 p.m.