Changeset 54361


Ignore:
Timestamp:
Jul 25, 2009, 11:50:18 AM (10 years ago)
Author:
enl@…
Message:

Added timestamping at the start of every phase

Location:
branches/gsoc09-logging/base/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc09-logging/base/src/macports1.0/macports.tcl

    r53509 r54361  
    6464    variable open_mports {}
    6565
    66     variable ui_priorities "debug info msg error warn"
    67     variable port_stages "fetch checksum"
     66    variable ui_priorities "debug info msg error warn any"
     67    variable port_stages "any fetch checksum"
    6868    variable current_stage "main"
    6969}
     
    133133    global macports::current_stage
    134134    set macports::current_stage $phase
     135    if {$phase != "main"} {
     136        set cur_time [clock format [clock seconds] -format  {%+}]
     137        ui_any "--->  Stage $phase started at $cur_time"
     138    }
    135139}
    136140proc ui_message {priority prefix stage args} {
  • branches/gsoc09-logging/base/src/port/port.tcl

    r53509 r54361  
    14311431            set data [read $fp]
    14321432            set data [split $data "\n"]
    1433             if {![info exists global_options(ports_log_stage)]} {
     1433
     1434            if {[info exists global_options(ports_log_stage)]} {
     1435                set stage $global_options(ports_log_stage);
     1436            } else {
    14341437                set stage "\[a-z\]*"
     1438            }
     1439
     1440            if {[info exists global_options(ports_log_prefix)]} {
     1441                set prefix $global_options(ports_log_prefix);
    14351442            } else {
    1436                 set stage $global_options(ports_log_stage);
    1437             }
    1438             if {![info exists global_options(ports_log_prefix)]} {
    14391443                set prefix "\[a-z\]*"
    1440             } else {
    1441                 set prefix $global_options(ports_log_prefix);
    14421444            }
    14431445            set match ""
    14441446            foreach line $data {
    1445                 set exp "^:$prefix:$stage .*$"
     1447                set exp "^:($prefix|any):($stage|any) .*$"
    14461448                regexp $exp $line match
    14471449                if {$match == $line} {
    1448                     regsub "^:$prefix:$stage "  $line "" line
     1450                    regsub "^:\[a-z\]*:\[a-z\]* "  $line "" line
    14491451                    puts $line
    14501452                }
Note: See TracChangeset for help on using the changeset viewer.