diff --git a/Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php b/Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php index 653c5cd..7907186 100644 --- a/Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php +++ b/Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php @@ -117,7 +117,6 @@ function main($request, $compiler_config) // Log the names of the project files and the libraries used in it. if ($format != "autocomplete") { - $user_id = $sketch_id = "null"; $req_elements = array("Files: "); foreach ($request["files"] as $file) { @@ -136,6 +135,16 @@ function main($request, $compiler_config) $req_elements[] = $libname . "/" . $libfile["filename"]; } } + + $user_id = "null"; + if (isset($request['userId'])) { + $user_id = $request['userId']; + } + + $sketch_id = "null"; + if (isset($request['projectId'])) { + $sketch_id = $request['projectId']; + } $this->logger_id = microtime(true) . "_" . substr($compiler_config['compiler_dir'], -6) . "_user:$user_id" . "_project:$sketch_id";