title: What defines the log type (Default, Alert, Error, Critical, etc) on logs out of a Cloud Run container instance?
body: <p>I have an <code>express</code> server that is hosted on Cloud Run / Docker container.</p>
  <p>This is the screen where we can view logs that come out of the deployed instance.</p>
  <p><a href="https://i.stack.imgur.com/yW9tZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yW9tZ.png" alt="enter image description here" /></a></p>
  <p>What defines the &quot;type&quot; of the log message: as in <code>Alert, Critical, Error, Warning, Debug, Info, Notice and Default</code></p>
  <p>If I log with <code>console.error</code> will it show up as an <code>Error</code> ?</p>
  <p>What is the documentation on this subject?</p>
  <hr />
  <p><strong>UPDATE:</strong> Trying to log an error with the type <code>Error</code></p>
  <pre><code>const logError = (msg: string | Error) =&gt; console.error(`[test:error] ${msg}`);
  
  const testError = () : void =&gt; {
    try {
      throw new Error(&quot;TEST ERROR&quot;);
    }
    catch(err) {
      const someError = new Error(&quot;HELLO ERROR&quot;);
      console.log(someError);
      console.error(someError);
      logError(err);
      logError(&quot;ERROR STRING MSG&quot;);
    }
  };
  </code></pre>
  <p>These were the results:</p>
  <p><a href="https://i.stack.imgur.com/VJBXD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJBXD.png" alt="enter image description here" /></a></p>
  <p>Not a single log with the type <code>Error</code>. Is this not supposed to be triggered by our code? When should it happen?</p>
  <p>I'd like to filter logged messages from my <code>catch</code> blocks in some situations and I was hoping to filter for the <code>Error</code> log type. I guess I'll have to add the <code>[error]</code> string flag and filter for that.</p>
  <p>How do people usually handle this?</p>