Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/log.tcl part of check-in [66235f2430] - Updated the copyright information of all files touched in the new year. by aku on 2008-02-06 05:04:12. Also file tools/cvs2fossil/lib/log.tcl part of check-in [6b78df3861] - Merge in changes from Andreas's branch. by drh on 2008-02-08 21:52:21. [view]

To:

File tools/cvs2fossil/lib/log.tcl part of check-in [7b71f64766] - Integrated memory tracking into the option processor for activation and configuration, and into the log system for use. The latter means that each actual output to the log is an introspection point. by aku on 2008-02-16 06:45:03. [view]

@@ -14,10 +14,11 @@
 
 # # ## ### ##### ######## ############# #####################
 ## Requirements
 
-package require Tcl 8.4 ; # Required runtime
-package require snit    ; # OO system.
+package require Tcl 8.4        ; # Required runtime
+package require snit           ; # OO system.
+package require vc::tools::mem ; # Memory tracking.
 
 # # ## ### ##### ######## ############# #####################
 ##
 
@@ -137,9 +138,12 @@
 
     # Write handler. Each message is a line.
 
     proc OUT/write {system text} {
-	puts "$system [join [split $text \n] "\n$system "]"
+	set m [mlog]
+	regsub -all {[^	]} $m { } b
+	puts "$m$system [join [split $text \n] "\n$b$system "]"
+	mlimit
 	return
     }
 
     # Progress handler. Uses \r to return to the beginning of the
@@ -166,11 +170,15 @@
 }
 
 namespace eval ::vc::tools {
     namespace export log
+    namespace eval log {
+	namespace import ::vc::tools::mem::mlog
+	namespace import ::vc::tools::mem::mlimit
+    }
 }
 
 # -----------------------------------------------------------------------------
 # Ready
 
 package provide vc::tools::log 1.0
 return