Debug.PhyloSim: Save a debug message in the PhyloSim log file

Description Usage Arguments Value Author(s) See Also Examples

Description

Save a debug message in the PhyloSim log file.

The debug message is written to the log file only if the log level is non-negative. You can use this method for logging debug messages in the case you write classes for PhyloSim.

Usage

1
2
## S3 method for class 'PhyloSim'
Debug(this, message, ...)

Arguments

this

A PhyloSim object.

message

A character vector of length one.

...

Not used.

Value

The message (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see PhyloSim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
	# create a PhyloSim object,
	# with logLevel set to zero
	sim<-PhyloSim(log.level=0);
	# log a debug message
	Debug(sim,"Some useful detail...");
	# close log connection
	close(sim$.log.connection)
	# print out the log file
	cat(paste(scan(file=sim$LogFile,what=character(),sep="\n"),collapse="\n"));cat("\n");
	# clean up
	unlink(sim$logFile)
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.