FileLogger.this

A constructor for the FileLogger Logger that takes a reference to a File.

The File passed must be open for all the log call to the FileLogger. If the File gets closed, using the FileLogger for logging will result in undefined behaviour.

Parameters

file File

The file used for logging.

lv LogLevel

The LogLevel for the FileLogger. By default the LogLevel for FileLogger is LogLevel.all.

Examples

auto file = File("logFile.log", "w");
auto l1 = new FileLogger(file);
auto l2 = new FileLogger(file, LogLevel.fatal);

Meta