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 FileLogger
clear()
Clears the logger, discarding anything it has logged in the past.void
close()
Closes this logger.Path
getOutFilePath()
Returns the path of the output file.FileLogger
log(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:Logger
Logs the given string.- Specified by:
log
in classLogger<FileLogger>
- Parameters:
string
- String to log.- Returns:
- This logger.
-
clear
Description copied from class:Logger
Clears the logger, discarding anything it has logged in the past.- Specified by:
clear
in classLogger<FileLogger>
- Returns:
- This logger.
-
close
public void close()Description copied from class:Logger
Closes this logger.- Overrides:
close
in classLogger<FileLogger>
-