From 70c0855578332ceb48772fee5d5abaf066b99ab1 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sun, 8 Dec 2013 22:05:19 -0500 Subject: dbg messaging redone to show location of the caller as well --- GradeBook_lib.tcl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index bbfd95a..88d61e1 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -430,15 +430,18 @@ proc grade_Category2html_name { category } { return $html_name } -proc dbg {msg {category msg_level_critical}} { +proc dbg {msg {category msg_level_critical} {location ""}} { global GradebookServerConfig + if { $location ne "" } { + set location " in $location" + } switch $category { - msg_level_info {set msg_header "Info:"; set level 6} - msg_level_warning {set msg_header "Warning:"; set level 4} - msg_level_dbg {set msg_header "Debug:"; set level 3} - msg_level_log {set msg_header "Log:"; set level 2} - msg_level_critical {set msg_header "Error:"; set level 1} - default {set msg_header "Unknown:"; set level 0} + msg_level_info {set msg_header "Info$location:"; set level 6} + msg_level_warning {set msg_header "Warning$location:"; set level 4} + msg_level_dbg {set msg_header "Debug$location:"; set level 3} + msg_level_log {set msg_header "Log$location:"; set level 2} + msg_level_critical {set msg_header "Error$location:"; set level 1} + default {set msg_header "Unknown$location:"; set level 0} } if { $level <= $GradebookServerConfig(verbosity_level) } { -- cgit v1.2.3