diff --git a/app.js b/app.js index f81ad34..28b10eb 100644 --- a/app.js +++ b/app.js @@ -134,6 +134,8 @@ function logSpec(req, synthResult) { var user = req.body.user; var logEnabled = req.body.logEnabled; + console.log(logEnabled); + const project = 'tslapi-2'; // Build structured log messages as an object. @@ -166,7 +168,7 @@ function logSpec(req, synthResult) { ); // Serialize to a JSON string and output. - if (logEnabled) { + if (logEnabled === 'true') { console.log(JSON.stringify(entry)); } } diff --git a/docs/index.html b/docs/index.html index b8be5eb..7e8fa84 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,7 +15,9 @@ let targetLang = document.getElementById("targetLang").value; let userVal = document.getElementById("userBox").value; let logging = document.getElementById("logging").checked; - $.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", { tsl: tslSpec, target: targetLang, user: userVal, logEnabled: logging }, function (data) { + const urlEndpoint = 'http://localhost:8080/tslsynth' + //const urlEndpoint = "https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth" + $.post(urlEndpoint, { tsl: tslSpec, target: targetLang, user: userVal, logEnabled: logging }, function (data) { document.getElementById("codeBox").value = data; }) .fail(function (response) {