[138948] trunk/base/src/macports1.0/macports.tcl

raimue at macports.org raimue at macports.org
Fri Jul 24 14:46:53 PDT 2015


Revision: 138948
          https://trac.macports.org/changeset/138948
Author:   raimue at macports.org
Date:     2015-07-24 14:46:53 -0700 (Fri, 24 Jul 2015)
Log Message:
-----------
macports1.0: Don't add a special "debuglog" string to channels, we want to log everything anyway

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2015-07-24 21:31:09 UTC (rev 138947)
+++ trunk/base/src/macports1.0/macports.tcl	2015-07-24 21:46:53 UTC (rev 138948)
@@ -138,10 +138,6 @@
         ui_debug "Logging disabled, error opening log file: $err"
         return 1
     }
-    # Add our log-channel to all already initialized channels
-    foreach key [array names channels] {
-        set macports::channels($key) [concat $macports::channels($key) debuglog]
-    }
     return 0
 }
 proc macports::ch_logging {mport} {
@@ -234,27 +230,27 @@
     } 
 
     foreach chan $macports::channels($priority) {
-        if {[info exists ::debuglog] && ($chan eq "debuglog")} {
-            set chan $::debuglog
-            if {[info exists macports::current_phase]} {
-                set phase $macports::current_phase
-            }
-            set strprefix ":${priority}:$phase "
-            if {[lindex $args 0] eq "-nonewline"} {
-                puts -nonewline $chan $strprefix[lindex $args 1]
-            } else {
-                puts $chan $strprefix[lindex $args 0]
-            }
+        if {[lindex $args 0] eq "-nonewline"} {
+            puts -nonewline $chan $prefix[lindex $args 1]
+        } else {
+            puts $chan $prefix[lindex $args 0]
+        }
+    }
 
+    if {[info exists ::debuglog]} {
+        set chan $::debuglog
+        if {[info exists macports::current_phase]} {
+            set phase $macports::current_phase
+        }
+        set strprefix ":${priority}:$phase "
+        if {[lindex $args 0] eq "-nonewline"} {
+            puts -nonewline $chan $strprefix[lindex $args 1]
         } else {
-            if {[lindex $args 0] eq "-nonewline"} {
-                puts -nonewline $chan $prefix[lindex $args 1]
-            } else {
-                puts $chan $prefix[lindex $args 0]
-            }
+            puts $chan $strprefix[lindex $args 0]
         }
     }
 }
+
 proc macports::ui_init {priority args} {
     global macports::channels ::debuglog
     set default_channel [macports::ui_channels_default $priority]
@@ -265,10 +261,6 @@
         set channels($priority) $default_channel
     }
 
-    # if some priority initialized after log file is being created
-    if {[info exists ::debuglog]} {
-        set channels($priority) [concat $channels($priority) debuglog]
-    }
     # Simplify ui_$priority.
     try {
         set prefix [ui_prefix $priority]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150724/0064edcf/attachment.html>


More information about the macports-changes mailing list