Changeset 267 for trunk/bMotion.tcl


Ignore:
Timestamp:
09/16/03 06:22:33 (9 years ago)
Author:
jamesoff
Message:

better logging handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bMotion.tcl

    r266 r267  
    3131} 
    3232 
     33foreach letter [split "d12345678" {}] { 
     34  set bMotionCache($letter,lastlog) "" 
     35  set bMotionCache($letter,lastcount) 0 
     36} 
     37 
    3338proc bMotion_putloglev { level star text } { 
    34   global bMotion_testing 
     39  global bMotion_testing bMotionCache 
    3540  regsub "bMotion:" $text "" text 
    3641  set text2 "" 
     
    4146 
    4247  if {$bMotion_testing == 0} { 
     48    if {$bMotionCache($level,lastlog) == $text} { 
     49      incr bMotionCache($level,lastcount) 
     50      return 
     51    } 
     52    if {$bMotionCache($level,lastcount) > 0} { 
     53      putloglev $level $star "($level)Previous message repeated $bMotionCache($level,lastcount) time(s)" 
     54    } 
    4355    putloglev $level $star "($level)$text" 
     56    set bMotionCache($level,lastlog) $text 
     57    set bMotionCache($level,lastcount) 0 
    4458  } 
    4559} 
Note: See TracChangeset for help on using the changeset viewer.