Over time the past few years, more and more columns were added to Tailviewer (OriginalIndex and SourceId for a merged data source, DeltaTime and ElapsedTime for all) and the existing data model of having a simple struct for an entire line got harder and harder to support.
This is addressed by fully implementing the new API in which ILogFiles are similar to an excel sheet: They have a variable amount of columns and rows. Custom log files may even introduce rows not part of Tailviewer.Core (however there's no display component for this just yet) and still take part in log file merging, filtering, etc..
With this new API, clients may retrieve data from only those columns they are interested in, i.e. if one wants to display the RawContent column, then all one has to do is:
And the ILogFile will take care of copying the relevant portions into the destination buffer. There's countless of overloads for ILogFile.GetEntries to:
Retrieve a non-contiguous section of rows as specified by a list of LogLineIndex values
Retrieve data from multiple columns at the same time
Retrieve data from all columns the log file has to offer
Specify where the data is placed into the destination buffer
Changes proposed in this pull request:
Replaced usage of deprecated API with "new" one:
[x] TextCanvas
[x] TextLine
[x] AbstractDataSource
[x] FilteredLogFile
[x] MultiLineLogFile
[x] MergedLogFile
[x] TextLogFile
[x] LogFileProxy
[x] NoThrowLogFile
[x] InMemoryLogFile
[x] EventLogFile
[x] LogFileToStreamExporter
Any expected problems concerning backwards compatibility of existing plugins?
Yes - Some plugins will be broken:
Plugins (<= v0.9) which implement ILogFile, ILogFileColumn or ILogEntry themselves will no longer be loaded and have to be modified
Plugins (<= v0.9) which access an ILogFile might no longer work and have to be modified
Removed Types
Removed all types related to the protoype-ish LogTables (which were a design predecessor to the current ILogFile iteration anyways)
Changed Types
Removed ILogFile.GetLine, users may use LogFileExtensions.GetEntry
Removed ILogFile.GetSection, users may use ILogFile.GetEntries
Reason for this MR
Over time the past few years, more and more columns were added to Tailviewer (OriginalIndex and SourceId for a merged data source, DeltaTime and ElapsedTime for all) and the existing data model of having a simple struct for an entire line got harder and harder to support.
This is addressed by fully implementing the new API in which ILogFiles are similar to an excel sheet: They have a variable amount of columns and rows. Custom log files may even introduce rows not part of Tailviewer.Core (however there's no display component for this just yet) and still take part in log file merging, filtering, etc..
With this new API, clients may retrieve data from only those columns they are interested in, i.e. if one wants to display the
RawContent
column, then all one has to do is:And the ILogFile will take care of copying the relevant portions into the destination buffer. There's countless of overloads for
ILogFile.GetEntries
to:LogLineIndex
valuesChanges proposed in this pull request:
Replaced usage of deprecated API with "new" one:
Any expected problems concerning backwards compatibility of existing plugins?
Yes - Some plugins will be broken:
Removed Types
Changed Types
ILogFile.GetLine
, users may useLogFileExtensions.GetEntry
ILogFile.GetSection
, users may useILogFile.GetEntries
ILogFileColumn.DisplayName
LogFileColumns.OriginalDataSourceName
LogFileColumns.SourceId
IReadOnlyLogEntry.OriginalDataSourceName
IReadOnlyLogEntry.SourceId
ILogEntry.OriginalDataSourceName
ILogEntry.SourceId
ILogFilePropertyDescriptor.DisplayName
Renamed Types
ILogFileColumn
toILogFileColumnDescriptor
CustomLogFileColumn
toCustomLogFileColumnDescriptor
Any expected problems concerning backwards compatibility of existing user settings?
No
Does this break existing user workflows?
No