title: Structured Logs in Google Cloud Run not being parsed (using Winston for logging)
body: <p>I'm attempting to format my logs in such a way that Google Cloud will correctly extract the log level. This is running on Cloud Run, with typescript. Cloud Run is grabbing the logs from the container output.</p>
  
  <p>If I do the following, google correctly parses the log line:</p>
  
  <pre><code>console.log(JSON.stringify({
     severity: 'ERROR',
     message: 'This is testing a structured log error for GCP'
  }));
  </code></pre>
  
  <p>And the log output looks like this:
  <a href="https://i.stack.imgur.com/8kEja.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8kEja.png" alt="log level error"></a></p>
  
  <p>I've tried a number of different ways to format with winston, ended up with the following:</p>
  
  <pre><code>useFormat = format.combine(
        format((info, opts) =&gt; {
          info['severity'] = info.level;
          delete info.level;
          return info;
        })(),
        format.json());
  
  
      this.winston = winston.createLogger({
        level: logLevel,
        format: useFormat,
        transports: [new winston.transports.Console()]
      });
  </code></pre>
  
  <p>Which looks like it will work (it correctly outputs the json line), I get this in the GCP logs:
  <a href="https://i.stack.imgur.com/erQTl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/erQTl.png" alt="enter image description here"></a></p>
  
  <p>Any help appreciated.</p>