Class FileLogger
java.lang.Object
it.poliba.sisinflab.tinyme.util.logging.Logger<FileLogger>
it.poliba.sisinflab.tinyme.util.logging.FileLogger
public final class FileLogger extends Logger<FileLogger>
Logger class that logs to file.
- See Also:
Logger
-
Constructor Summary
Constructors Constructor Description FileLogger(Path outFilePath)Instantiates a new logger instance. -
Method Summary
Modifier and Type Method Description FileLoggerclear()Clears the logger, discarding anything it has logged in the past.voidclose()Closes this logger.PathgetOutFilePath()Returns the path of the output file.FileLoggerlog(String string)Logs the given string.
-
Constructor Details
-
FileLogger
Instantiates a new logger instance.- Parameters:
outFilePath- Path of the output file.
-
-
Method Details
-
getOutFilePath
Returns the path of the output file.- Returns:
- Path of the output file.
-
log
Description copied from class:LoggerLogs the given string.- Specified by:
login classLogger<FileLogger>- Parameters:
string- String to log.- Returns:
- This logger.
-
clear
Description copied from class:LoggerClears the logger, discarding anything it has logged in the past.- Specified by:
clearin classLogger<FileLogger>- Returns:
- This logger.
-
close
public void close()Description copied from class:LoggerCloses this logger.- Overrides:
closein classLogger<FileLogger>
-