public class FileChannelDataLoggerFactory extends Object implements IDataLoggerFactory
A log file is named according to the follwing pattern 'loggerSystemName'_'loggerName'_'qualifier'.log The different parts of the name make i possible to deduce the following information from the logfile name 1.) loggerSystem 2.) loggername 3.) qualifier pof the logfile for the loggerA logical logger name has to unique for all logfile of the current loggerfactory. Diese Factory erzeugt FileChannelDataLogger . Es wird ein logischer Name mitgegeben und es wird im Verzeichnis eine datei mit diesem namen angelegt und auf dieser Datei eine TAEnabledRandomAccessFile instanziert. The logic Name is unique concerning the loggerssytem
| Constructor and Description |
|---|
FileChannelDataLoggerFactory(String loggerSystemName,
File directory) |
FileChannelDataLoggerFactory(String loggerSystemName,
String directoryName) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
destroys a logfiles
|
void |
destroyLogger(String loggerName)
destroys the logger an all is associated resources an information
|
Set<String> |
findLoggerNames() |
String |
getLoggerSystemName() |
File |
getLoggingDirectory() |
IDataLogger |
instanciateLogger(String loggerName)
open the logger with mode
AccessMode.APPEND |
IDataLogger |
instanciateLogger(String loggerName,
AccessMode accessMode) |
public FileChannelDataLoggerFactory(String loggerSystemName, String directoryName)
loggerSystemName - directoryName - logfile are created in this directorypublic String getLoggerSystemName()
getLoggerSystemName in interface IDataLoggerFactorypublic File getLoggingDirectory()
public IDataLogger instanciateLogger(String loggerName) throws IOException
IDataLoggerFactoryAccessMode.APPENDinstanciateLogger in interface IDataLoggerFactoryloggerName - unique Identifier of the logger (concering to the logger system)IOExceptionpublic IDataLogger instanciateLogger(String loggerName, AccessMode accessMode) throws IOException
instanciateLogger in interface IDataLoggerFactoryloggerName - unique Identifier of the logger (concering to the logger system)IOExceptionpublic void cleanup()
cleanup in interface IDataLoggerFactorypublic void destroyLogger(String loggerName)
IDataLoggerFactorydestroyLogger in interface IDataLoggerFactorypublic Set<String> findLoggerNames() throws IOException
findLoggerNames in interface IDataLoggerFactoryIOExceptionCopyright © 2017. All rights reserved.