Skip to content

Columnizer API

Patrick Bruner edited this page Jul 10, 2025 · 1 revision

Interface:ILogLineColumnizer

Constraints:

  • The class must end with Columnizer

For some insights in the return Interfaces see

Also some informations #13

Normal

This splits a single line into the defined columns. The columns are displayed in the Grid.

GetColumnCount

Returns number of columns this plugin will return for the given line. The LineCount column is handled by LogExpert and must not considered here.

GetColumnNames

Return names of columns. These are the displayed Grid header values. Values are used from left to right.

GetDescription

Description for this columnizer. This is displayed in the columnizer selection dialog.

GetName

Name for the columnizer. This is displayed in the columnizer selection dialog.

SplitLine

Splits the given lines in the defined columns.

Important this is called from the Gui Thread! So the faster the execution is the faster the line can be displayed

If timeshift is supported you have to consider the Offsets set by SetTimeOffset in your Date/Time columns!

IsTimeShiftImplemented

True if functionality is supported by columnizer

GetTimeOffset

Only needed if TimeShift is supported by columnizer. You can throw a NotImplemented if not supported.

The current stored tiemstamp offset (set by SetTimeOffset())

GetTimeStamp

Only needed if TimeShift is supported by columnizer. You can throw a NotImplemented if not supported.

Return the Timestamp for the given line. Return DateTime.MinValue if there is no valid timestamp.

PushValue

Only needed if TimeShift is supported by columnizer. You can throw a NotImplemented if not supported.

This is called if a user changed a value in a column (edit mode in the LogView). This is used to recalculate the new timestamp offset. Important Only handle this call if the given column is a timestamp column

SetTimeOffset

Only needed if TimeShift is supported by columnizer. You can throw a NotImplemented if not supported.

Sets an offset for displaying values. This value has to be stored and added to the timestamp column returned by SplitLine()

Example

classExampleColumnizer:ILogLineColumnizer{publicstringGetName(){return"Example Columnizer";//Some great name so everyone knows from just that whats on}publicstringGetDescription(){return"Just a Example columnizer which adds to every line a [Example]";//Some text what describes your columnizer}publicintGetColumnCount(){return1;//We just return a static value or you could e.g. use the configure interface to define the count}publicstring[]GetColumnNames(){returnnewstring[]{"Example column"};}publicIColumnizedLogLineSplitLine(ILogLineColumnizerCallbackcallback,ILogLineline){ColumnizedLogLinecolumnizedLogLine=newColumnizedLogLine();columnizedLogLine.LogLine=line;// Add the reference to the LogLine columnizedLogLine.ColumnValues=newIColumn[]{newColumn{FullValue=string.Format("[Example] {0}",line.FullLine),//Here you could call some method or do some other workParent=columnizedLogLine//Just add the reference to the columnizedLogLine}};returncolumnizedLogLine;}publicboolIsTimeshiftImplemented(){returnfalse;//This is an example and we don't support timeshift}publicvoidSetTimeOffset(intmsecOffset){thrownewNotImplementedException();//Nothing to do here}publicintGetTimeOffset(){thrownewNotImplementedException();//Nothing to do here}publicDateTimeGetTimestamp(ILogLineColumnizerCallbackcallback,ILogLineline){thrownewNotImplementedException();//Nothing to do here}publicvoidPushValue(ILogLineColumnizerCallbackcallback,intcolumn,stringvalue,stringoldValue){//Nothing to do here}}

Clone this wiki locally