Class TetradLogger

java.lang.Object
edu.cmu.tetrad.util.TetradLogger

public class TetradLogger extends Object
Represents a logging utility used throughout tetrad. Unlike a typical logger, this does not work on levels; instead one can set events need to be logged. This is done by giving the logger a TetradLoggerConfig which will be used to determine whether some event should be logged.

Although one can explicitly construct instance of TetradLoggerConfig and set them in the logger, the configuration detail for most models is defined in the configuration.xml file and added to the logger at startup. A pre-configured TetradLoggerConfig for some model can be found by calling getTetradLoggerConfigForModel(Class)

Furthermore, the logger supports logging to a sequence of files in some directory. To start logging to a new file in the logging directory (assuming it has been set) call setNextOutputStream to remove this stream from the logger call removeNextOutputStream. In adding to the feature arbitrary streams can be added and removed from the logger by calling addOutputStream and removeOutputStream.

Version:
$Id: $Id
Author:
Tyler Gibson