- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsmcp::LogSummaryReader
::nsmcp::LogSummaryReadercreate ... \
[ -buffer (default "") ] \
[ -channel:required channel:required ] \
[ -index (default "0") ] \
[ -limit:required limit:required ] \
[ -lookahead (default "") ] \
[ -maxBytes:required maxBytes:required ] \
[ -offset:required offset:required ]
Defined in /usr/local/ns/tcl/nsmcp/log-traffic-summary.tcl
Class Relations
::nx::Class create ::nsmcp::LogSummaryReader \ -superclass ::nsmcp::ObjectMethods (to be applied on instances)
next (scripted, public)
<instance of nsmcp::LogSummaryReader> next
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.
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 $eventnextLine (scripted, public)
<instance of nsmcp::LogSummaryReader> nextLine
Read the next physical line for an access-file scan. Delegate to the reader's bounded line source without logical-record assembly.
- Returns:
- The next line descriptor, or an empty result at exhaustion.
- Testcases:
- No testcase defined.
return [:line]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)