From 96e7983bfe96b865fdb67e8d41ca5d4104f9261c Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 18 Oct 2016 09:46:04 -0400 Subject: moved json requirement up front --- GradeBook.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3