{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/JS_API/built_in_functions/log(message)/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"557576b9-650a-559e-ad5e-2f1844a47d36","excerpt":"This function prints its argument (message) to the server log console. It is used for debugging. Options The log function can take arguments of any type.?> If a…","html":"<h1><code class=\"language-text\">function log(message)</code></h1>\n<hr>\n<p>This function prints its argument (message) to the server log console. It is used for debugging.</p>\n</br>\n<h4>Options</h4>\n<p>The log function can take arguments of any type.</p>\n<p class='warn'>If a <code class=\"language-text\">json</code> object is passed to it, it will be printed to the log console in its entirety, with every field printed out.</p>\n</br>\n<h4>How to use</h4>\n<p>For example, the log function can be used to track current values of variables and object attributes:</p>\n<div class=\"gatsby-highlight\" data-language=\"sc\"><pre class=\"language-sc\"><code class=\"language-sc\"><span class=\"token comment\">// $session.codes = [\"XeZ4\",\"o09E\",\"sadL\"];</span>\n<span class=\"token keyword\">state:</span> GetPromoCode\n    <span class=\"token storageType\">q!:</span> want * get * promo code\n    <span class=\"token variableParameter\">a:</span> Your promo code is <span class=\"token constantCharacter\">{{ $session.codes.splice(0, 1) }}</span>\n    <span class=\"token variableParameter\">script:</span>\n        log(\"Promo codes left: \" + $session.codes.length);\n</code></pre></div>\n<p>Then the expected log console output will be:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">2018-11-15 14:49:43,123 INFO [js] - Promo codes left: 2</code></pre></div>","frontmatter":{"title":"","description":null},"headings":[{"value":"<code class=\"language-text\">function log(message)</code>"}]}},"pageContext":{"slug":"/docs/en/JS_API/built_in_functions/log(message)/","previous":{"fields":{"slug":"/docs/en/JS_API/built_in_functions/parseXml/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/JS_API/built_in_functions/hasOperatorsOnline/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}