FileLogHistory class abstract
Extended ILogHistory with daily file-based persistence.
Implementations organize logs into per-day JSON files, support auto-save, cleanup strategies, and import/export.
- Implemented types
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
history
→ List<
ISpectLogData> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionDirectory → String
-
Path to the managed history directory.
no setter
- todaySessionPath → String
-
Path to today's log file.
no setter
Methods
-
add(
ISpectLogData data) → void -
inherited
-
clear(
) → void -
inherited
-
clearAllFileStorage(
) → Future< void> - Removes all persisted log files.
-
clearDateStorage(
DateTime date) → Future< void> -
Removes the log file for
date. -
dispose(
) → void -
Releases resources (e.g. auto-save timers in FileLogHistory).
inherited
-
exportToJson(
) → Future< String> - Serializes current history to a JSON string.
-
getAvailableLogDates(
) → Future< List< DateTime> > - Sorted list of dates that have persisted log files.
-
getDateFileSize(
DateTime date) → Future< int> -
File size in bytes for
date. Returns 0 if the file does not exist. -
getLogPathByDate(
DateTime date) → Future< String> -
File or directory path for
date. Returns empty string when absent. -
getLogsByDate(
DateTime date) → Future< List< ISpectLogData> > -
Reads logs for
datewithout modifying current history. -
getLogsBySession(
String sessionPath) → Future< List< ISpectLogData> > - Reads logs from a managed segment, legacy file, or date-directory path.
-
getSessionStatistics(
) → Future< SessionStatistics> - Calculates comprehensive session statistics.
-
hasTodaySession(
) → Future< bool> - Whether today's session file exists on disk.
-
importFromJson(
String jsonString) → Future< void> -
Appends entries parsed from
jsonStringto current history. -
loadFromDate(
DateTime date) → Future< void> -
Replaces current history with entries from
date. Returns silently if the file does not exist. -
loadTodayHistory(
) → Future< void> -
Convenience for
loadFromDate(DateTime.now()). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveToDailyFile(
) → Future< void> - Persists current history to a daily-organized file.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateAutoSaveSettings(
{bool? enabled, Duration? interval}) → void - Reconfigures auto-save at runtime.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited