nsmcp::CachedLogSearch method physicalLine (protected)

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

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

Parameters:
channel (required)
limit (required)

Testcases:
No testcase defined.
Source code:
set start [tell $channel]; set sample {}; set clipped false; set terminated false
while {[tell $channel] < $limit} {
    set position [tell $channel]
    set block [read $channel [expr {min(32768,$limit-$position)}]]
    if {$block eq ""} break
    set newline [string first \n $block]
    if {$newline >= 0} {
        set part [string range $block 0 [expr {$newline-1}]]
        seek $channel [expr {$position+$newline+1}]
        set terminated true
    } else {set part $block}
    set room [expr {${:maxMessageBytes}-[string length $sample]}]
    if {[string length $part] > $room} {set clipped true}
    append sample [string range $part 0 [expr {$room-1}]]
    if {$terminated} break
}
set text [encoding convertfrom utf-8 [string trimright $sample \r]]
regsub -all {\x1b\[[0-9;]*m} $text {} text
return [dict create start $start end [tell $channel] text $text  truncated $clipped terminated $terminated]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: