Package org.ka2ddo.yaac.core
Class AX25Logger
- All Implemented Interfaces:
Comparable<ReschedulableTimerTask>
,Runnable
,ShutdownHandler
This class batches up logging AX.25 messages. By default, it logs in CSV format.
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ka2ddo.yaac.core.FileLogger
FileLogger.RolloverHandler<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dumpRecordQueueToFile
(File logFileFile, ArrayList<AX25Frame> recordQueue) Opens the specified sequential file for append, then write each of the AX.25 records in the recordQueue in order to the file, then close the file.Get the current logging file format for the packets.void
Change the logging file format for the packets.Methods inherited from class org.ka2ddo.yaac.core.FileLogger
flush, getDefaultLogDir, log, log, log, run, setDatePattern, setDefaultLogDir, setFilePrefix, setFileSuffix, setFlushInterval, setLogDirectory, setRolloverHandler, setRolloverInterval, setTimeZone, shutdown
-
Constructor Details
-
AX25Logger
Create an AX.25 frame logger instance.- Parameters:
prefix
- the String prefix to use for the log file name, prior to the date value
-
-
Method Details
-
getLogFileFormat
Get the current logging file format for the packets.- Returns:
- PacketExportMode to be used
-
setLogFileFormat
Change the logging file format for the packets.- Parameters:
pem
- PacketExportMode to be used
-
dumpRecordQueueToFile
public void dumpRecordQueueToFile(File logFileFile, ArrayList<AX25Frame> recordQueue) throws IOException Opens the specified sequential file for append, then write each of the AX.25 records in the recordQueue in order to the file, then close the file.- Specified by:
dumpRecordQueueToFile
in classFileLogger<AX25Frame>
- Parameters:
logFileFile
- File identifying the log file to open and writerecordQueue
- the ArrayList of ordered records to write- Throws:
IOException
- if record saving fails for any reason
-