nsmcp::LogSummaryReader method next (public)
<instance of nsmcp::LogSummaryReader> next
Defined in /usr/local/ns/tcl/nsmcp/log-traffic-summary.tcl
Read the next logical system-log event. Combine supported continuation lines and retain lookahead for the following event.
- Returns:
- The event dictionary, or an empty result at end of input.
- Testcases:
- No testcase defined.
Source code: if {${:lookahead} ne ""} { set line ${:lookahead} set :lookahead {} } else { set line [:line] } if {$line eq ""} { error "unexpected end of system log during summary scan" } set event [dict create offset [dict get $line start] endOffset [dict get $line end] message [dict get $line text] truncated [dict get $line truncated] complete false] while {${:offset}<${:limit}} { set line [:line] if {$line eq ""} { break } if {![::nsmcp::logRecordParser continuation [dict get $event message] [dict get $line text]]} { set :lookahead $line dict set event complete true return $event } set text "\n[dict get $line text]" set room [expr {max(0,${:maxBytes}-[string length [dict get $event message]])}] if {[string length $text]>$room || [dict get $line truncated]} { dict set event truncated true } if {$room>0} { dict append event message [string range $text 0 [expr {$room-1}]] } dict set event endOffset [dict get $line end] } return $eventXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)