Changeset 51378


Ignore:
Timestamp:
May 23, 2009, 6:44:29 PM (8 years ago)
Author:
enl@…
Message:

Put ui_channels inside macports.tcl and restored original ui_channels handling

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

Legend:

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

    r51303 r51378  
    107107}
    108108
     109proc macports::init_logging {} {
     110    global ::debuglog ::debuglogname
     111    if {![info exists ::debuglog]} {
     112        set ::debuglogname [mktemp /tmp/macports_debug.XXXXXX]
     113        set ::debuglog [open $::debuglogname w]
     114    }
     115    return $::debuglog
     116}
     117
    109118
    110119proc macports::ui_init {priority args} {
    111120    global macports::channels
     121    set default_channel [macports::ui_channels_default $priority]
     122    set logging_file [init_logging]
    112123
    113124    # Get the list of channels.
    114125    try {
    115         set channels [ui_channels $priority]
     126        set channels [concat [ui_channels $priority] $logging_file]
    116127    } catch * {
    117         set channels [ui_channels_default $priority]
    118     }
    119 
     128        set channels [concat $logging_file $default_channel]
     129    }
    120130    # Simplify ui_$priority.
    121131    if {[llength $channels] == 0} {
  • branches/gsoc09-logging/base/src/port/port.tcl

    r51303 r51378  
    170170        return -code break
    171171    }
    172 }
    173 
    174 proc ui_channels {priority} {
    175     global ::debuglog ::debuglogname
    176     set default_channel [macports::ui_channels_default $priority]
    177     if {![info exists ::debuglog]} {
    178         set ::debuglogname [mktemp /tmp/macports_debug.XXXXXX]
    179         set ::debuglog [open $::debuglogname w]
    180     }
    181     return [concat $default_channel $::debuglog]
    182172}
    183173
Note: See TracChangeset for help on using the changeset viewer.