RetVal=GetLogLines(LogFile, MoveToEnd, GoBackwards, RequestCount, FilterType, FilterSource, FilterWorkspace, FilterTarget, FilterHost, Line, NumLine, AtStart, AtEnd, TimeLine)

Description Gets a list of loglines. Blocks of lines are read into an array. The logs can start at the beginning or at the end and move forward or backwards.
[in] LogFileThe name of the logfile for which the lines should be obtained.
[in] MoveToEndSpecifies whether the reading of the file should start at the end/beginning of the file, or in the middle.
[in] GoBackwardsOne indicates that the logs are being read from the end backwards. MovetoEnd would mean that reading starts at the end if this is set to one. If set to zero and MovetoEnd is one then reading will start at the beginning.
[in] RequestCountA number that is used to identify that a change in log position is required. If the number is the same as the last request, then the same log entries are offered. A different number will cause the log lines fetched to move. This parameter is useful when used on a web page. Because of the nature of how the system gets lines, blocks at a time, a refresh on the page would cause the logs to move a block up or down (depending on the GoBackwards value). Requiring that this field have a different value to the last prevents this.
[in] FilterTypeFilter out log lines that are not of the specified type. There are 4 log types. Each log type is assigned a bit in the value. If the bit is on then the log type is shown.

  • Bit 1 - Info
  • Bit 2 - Warnings
  • Bit 3 - Errors
  • Bit 4 - Debug
[in] FilterSourceFilter out log lines that do not come from the specified source. Each source is assigned a bit. If the bit is on the line will be shown, if it is from the defined source.

  • Bit 1 - Aquirer
  • Bit 2 - Alarm
  • Bit 3 - Client
[in] FilterWorkspaceSpecifies that only lines with TargetID belonging to WorkspaceNo are shown. A value of -1 disables this filter.
[in] FilterTargetSpecifies that only lines with the specified TargetID are shown. A value of -1 disables this filter.
[in] FilterHostEither a FQDN or an IP can be given. Only lines with targets belonging to an element with either FQDN or IP matching are shown.
[out] LineA string array, starting at 1, containing the lines returned.
[out] NumLineThe number of lines returned/
[out] AtStartThe time from which the results started.
[out] AtEndThat time at which the results displayed ended.
[out] TimeLineIf the request takes more than a second then a time line of the next half hour is calculated. All log entries up to the time line are added to the array. This may not be the last item in the array (or first), due to filtering.
Return Value Zero indicates success, One indicates failure to communicate with service and two a failure in obtaining the info.

Copyright (c) Warren Flemmer