aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"