ronous operation, <code>console.log()</code>
will cause the AsyncHooks callbacks to be called. Using <code>console.log()</code> or
similar asynchronous operations inside an AsyncHooks callback function will thus
cause an infinite recursion. An easy solution to this when debugging is to use a
synchronous logging operation such as <code>fs.writeFileSync(file, msg, flag)</code>.
This will print to the file and will not invoke AsyncHooks recursively because
it is synchronous.</p>
<pre><code class="language-js">