Add prefix to logging

This commit is contained in:
prpr 2022-04-15 14:55:07 +01:00
parent da24fc6b20
commit 08de047d91
1 changed files with 5 additions and 1 deletions

View File

@ -377,7 +377,11 @@ proc ::auto::runplugin {fn {_plugin ""} args} {
} else {
set call [list $rfn $args]
}
if {[catch {uplevel 1 {*}$call} msg]} {
set ologprefix $::auto::logprefix
set ::auto::logprefix "$plugin:$::auto::logprefix"
set ret [catch {uplevel 1 {*}$call} msg]
set ::auto::logprefix $ologprefix
if {$ret} {
log "$rfn: $msg" 0
lassign [info stacktrace] p f l
log " $f:$l @ $p" 0