diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 22:05:19 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 22:05:19 -0500 |
commit | 70c0855578332ceb48772fee5d5abaf066b99ab1 (patch) | |
tree | 0329164e644720bc196d5367e5345c686e68edff | |
parent | 6e09da4962e67b0e66aa0de09d824eebd524338d (diff) | |
download | GradeBook-70c0855578332ceb48772fee5d5abaf066b99ab1.tar.gz GradeBook-70c0855578332ceb48772fee5d5abaf066b99ab1.zip |
dbg messaging redone to show location of the caller as well
-rwxr-xr-x | GradeBook_lib.tcl | 17 |
1 files 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) } { |