Class CSVLogger
java.lang.Object
log.CSVLogger
Name: CSVLogger
Description: A logger implementation that writes its output on a given CSV file. This class is thread-safe, so multiple threads may concurrently write on the same output file sharing the same CSVLogger instance.
Date: 11/dic/2009 Time: 17.16.14
- Version:
- 1.0
- Author:
- Bertoli Marco
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CSVLogger
Creates a new CSVLogger that writes to the given file- Parameters:
file- the file we should write tocolumns- the columns for the log fileappend- true to append to an existing file. False to create a new filecolSep- the column separatordigitSep- the decimal digit separator
-
-
Method Details
-
log
Logs the given values. Only the actual writing to the stream is synchronized. This method is designed so that each log line will never be mixed with another one.- Parameters:
values- a map with the value for each columndefaultValues- a map with default values for the log. Whenever a value is not found in values map, it is looked in defaultValues map.- Throws:
IOException- if a problem is risen opening or writing to the log file
-
dispose
Disposes this logger object, closing the writer.- Throws:
IOException- if an IO problem is risen closing the log file.
-
getFile
-
finalize
-