nsmcp::CachedLogSearch method record (protected)

 <instance of nsmcp::CachedLogSearch[i]> record channel start limit

Defined in /usr/local/ns/tcl/nsmcp/lib/log-search.tcl

Parameters:
channel (required)
start (required)
limit (required)

Testcases:
No testcase defined.
Source code:
seek $channel $start
set event [dict create offset $start endOffset $start message {}  complete false truncated false orphanContinuation false]
set first true
while {[tell $channel] < $limit} {
    set line [:physicalLine $channel $limit]
    set text [dict get $line text]
    if {!$first && [string index $text 0] ne ":"} {
        dict set event complete true
        seek $channel [dict get $line start]
        return $event
    }
    if {$first} {
        dict set event orphanContinuation [expr {[string index $text 0] eq ":"}]
    } else {set text \n$text}
    set event [:appendText $event $text]
    if {[dict get $line truncated]} {dict set event truncated true}
    dict set event endOffset [dict get $line end]
    set first false
}
return $event
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: