[54361] branches/gsoc09-logging/base/src
enl at macports.org
enl at macports.org
Sat Jul 25 04:50:20 PDT 2009
Revision: 54361
http://trac.macports.org/changeset/54361
Author: enl at macports.org
Date: 2009-07-25 04:50:18 -0700 (Sat, 25 Jul 2009)
Log Message:
-----------
Added timestamping at the start of every phase
Modified Paths:
--------------
branches/gsoc09-logging/base/src/macports1.0/macports.tcl
branches/gsoc09-logging/base/src/port/port.tcl
Modified: branches/gsoc09-logging/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc09-logging/base/src/macports1.0/macports.tcl 2009-07-25 11:06:29 UTC (rev 54360)
+++ branches/gsoc09-logging/base/src/macports1.0/macports.tcl 2009-07-25 11:50:18 UTC (rev 54361)
@@ -63,8 +63,8 @@
variable open_mports {}
- variable ui_priorities "debug info msg error warn"
- variable port_stages "fetch checksum"
+ variable ui_priorities "debug info msg error warn any"
+ variable port_stages "any fetch checksum"
variable current_stage "main"
}
@@ -132,6 +132,10 @@
proc ui_phase {phase} {
global macports::current_stage
set macports::current_stage $phase
+ if {$phase != "main"} {
+ set cur_time [clock format [clock seconds] -format {%+}]
+ ui_any "---> Stage $phase started at $cur_time"
+ }
}
proc ui_message {priority prefix stage args} {
global macports::channels ::debuglog macports::current_stage
Modified: branches/gsoc09-logging/base/src/port/port.tcl
===================================================================
--- branches/gsoc09-logging/base/src/port/port.tcl 2009-07-25 11:06:29 UTC (rev 54360)
+++ branches/gsoc09-logging/base/src/port/port.tcl 2009-07-25 11:50:18 UTC (rev 54361)
@@ -1430,22 +1430,24 @@
set fp [open $logfile r]
set data [read $fp]
set data [split $data "\n"]
- if {![info exists global_options(ports_log_stage)]} {
+
+ if {[info exists global_options(ports_log_stage)]} {
+ set stage $global_options(ports_log_stage);
+ } else {
set stage "\[a-z\]*"
+ }
+
+ if {[info exists global_options(ports_log_prefix)]} {
+ set prefix $global_options(ports_log_prefix);
} else {
- set stage $global_options(ports_log_stage);
- }
- if {![info exists global_options(ports_log_prefix)]} {
set prefix "\[a-z\]*"
- } else {
- set prefix $global_options(ports_log_prefix);
}
set match ""
foreach line $data {
- set exp "^:$prefix:$stage .*$"
+ set exp "^:($prefix|any):($stage|any) .*$"
regexp $exp $line match
if {$match == $line} {
- regsub "^:$prefix:$stage " $line "" line
+ regsub "^:\[a-z\]*:\[a-z\]* " $line "" line
puts $line
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090725/4c61730a/attachment-0001.html>
More information about the macports-changes
mailing list