aboutsummaryrefslogtreecommitdiff
path: root/GradeBook.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2016-10-18 09:46:04 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2016-10-18 09:46:04 -0400
commit96e7983bfe96b865fdb67e8d41ca5d4104f9261c (patch)
treef54174fe5e05df9af90e677afe16a0f70fe82e47 /GradeBook.tcl
parentec29288320bead9b99c303b2594f09a4dcafdb72 (diff)
downloadGradeBook-96e7983bfe96b865fdb67e8d41ca5d4104f9261c.tar.gz
GradeBook-96e7983bfe96b865fdb67e8d41ca5d4104f9261c.zip
moved json requirement up front
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-xGradeBook.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 7e0fae4..d07804c 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -10,6 +10,7 @@ package require ncgi
package require Tcl 8.5
package require sqlite3
package require md5
+package require json::write
} errStat ]
if { $err } {
::ncgi::header
@@ -82,7 +83,6 @@ set user [ Authenticate_User $user_requested $password ]
dbg "[timestamp] authenticated user $user_requested DB $coursedbfname as $user version $VERSION from $remote_ip" msg_level_log
dbg "[timestamp] requested action $action by user $user_requested DB $coursedbfname recognized as $user version $VERSION from $remote_ip" msg_level_log
-package require json::write
set logEntry {}
lappend logEntry timestamp [::json::write string [timestamp]]
lappend logEntry remoteIP [::json::write string "$remote_ip"]
@@ -98,6 +98,7 @@ lappend logEntry sortCol [::json::write string "$sortCol"]
lappend logEntry programVersion [::json::write string "$VERSION"]
lappend logEntry logLevel [::json::write string msg_level_log]
+::json::write indented false
set logEntryJsonString [json::write object {*}$logEntry]
set fid [open $GradebookServerConfig(log_file) a+]
puts $fid "$logEntryJsonString"