diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-21 15:24:04 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-21 15:24:04 -0500 |
commit | 1ce7217087fa853a41e783f560beb23ac23d2b49 (patch) | |
tree | 827f3fe4dc4f8c70f21867e0caffb8c1511c766b | |
parent | d5941a5a42beaff9ecae4bae8c8d4e57b94a8cbe (diff) | |
download | GradeBook-1ce7217087fa853a41e783f560beb23ac23d2b49.tar.gz GradeBook-1ce7217087fa853a41e783f560beb23ac23d2b49.zip |
use of new dbg proc call in main file
-rwxr-xr-x | GradeBook.tcl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index bff9175..4500cd1 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -59,19 +59,19 @@ set timestamp [clock format [clock seconds] -format "%Y-%m-%dT%H:%M:%S"] #CreateGradesTable db #CreateAccessRightsTable db -dbg [::ncgi::names] 4 +dbg [::ncgi::names] msg_level_info # logon and logoff actions are granted to everyone if { $action == "logon" } { set action [ LogMeOn ] } if { $action == "logoff" } { LogMeOff; set action defaultview } -dbg "===== Connection at $timestamp for user $user =====" +dbg "===== Connection at $timestamp for user $user_requested =====" msg_level_log ::ncgi::header set user [ Authenticate_User $user_requested $password ] +dbg "Requested user $user_requested logged in as $user" msg_level_dbg set dbfile "$GradebookServerConfig(grades_db_dir)/$coursedbfname" -dbg "DB filename: $dbfile" if { [file exists $dbfile] && ("$coursedbfname" ne "") } { htmlHeader puts "<body>" @@ -86,19 +86,22 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } { puts "<body>" if { "$coursedbfname" ne "" } { htmlErrorMsg "No requested database {$coursedbfname}. Please, check your url" - dbg "Attemt to access non existing database: {$dbfile}" + dbg "Attemt to access non existing database: {$dbfile}" msg_level_info } html_Show_Classes_List $permission_list $user } +dbg $permission_list msg_level_dbg + htmlFooter $permission_list puts "</body>" ###################### Main script ends ################################# } errStat ] if { $err } { - dbg "the following error happen: $errStat" 0 + dbg "Error: $errStat" msg_level_critical + htmlErrorMsg "Something went wrong, please, ask admin to have a look at logs" } # vim: ts=2 sw=2 foldmethod=indent: |