title: Logs not showing in Google Cloud Logging UI
body: <p>I'm trying to set up sending my application logs to Google Cloud Logging, but no matter what I try, the logs are not visible in the Log Viewer.</p>
  
  <p>I tried:</p>
  
  <ul>
  <li>using the <a href="https://github.com/googleapis/java-logging-logback" rel="nofollow noreferrer">Java Logging Logback</a> appender directly, following all of the steps in the documentation, setting different combinations of parameters</li>
  <li>using <a href="https://spring.io/projects/spring-cloud-gcp" rel="nofollow noreferrer">Spring Cloud GCP</a>, again following all of the tutorials and trying different configurations</li>
  <li>using the CLI to write log entries, using the examples from the docs</li>
  <li>using the API explorer to write log entries, providing all of the required fields</li>
  </ul>
  
  <p>The Log ingestion tab shows that the data is actually ingested and I am able to retrieve the entries using <code>gcloud logging read</code> or using the API explorer.</p>
  
  <p>Unfortunately, the logs are not showing up in the viewer, which greets me with</p>
  
  <blockquote>
    <p>[..] You do not have any logs in your project right now.</p>
  </blockquote>
  
  <p>The logging API is, of course, enabled (I guess I wouldn't be able to get the CLI/API explorer to work without it).</p>
  
  <p>Any clues what's wrong? Can it be that my logging entries have invalid format or are missing some key bit of information?</p>
  
  <p>Attaching a couple of log entries, just in case. First was created by the API, second one was sent from the app:</p>
  
  <pre><code>insertId: 1mty0nhg3b7x2xx
  logName: projects/my-project/logs/test.log
  receiveTimestamp: '2020-05-25T11:18:57.565490347Z'
  resource:
    labels:
      project_id: my-project
    type: global
  severity: INFO
  textPayload: It works!
  timestamp: '2020-05-25T11:18:57.565490347Z'
  </code></pre>
  
  <pre><code>insertId: cs0e1zg1qqxxx6
  labels:
    levelName: INFO
    levelValue: '20000'
    loggerName: org.springframework.web.servlet.DispatcherServlet
  logName: projects/my-project/logs/spring.log
  receiveTimestamp: '2020-05-24T16:37:47.275614395Z'
  resource:
    labels:
      project_id: my-project
    type: global
  severity: INFO
  textPayload: Completed initialization in 17 ms
  timestamp: '2020-05-24T16:37:47.234Z'
  </code></pre>
  
  <p>EDIT: I found a temporary workaround. I created a second project, wrote a short lambda that logs a message, and was able to see the logs for the lambda in that project. When I switched to the new "preview" mode, and changed project to the original one, I can now see the logs. However, when I switch back to "classic" mode, it still says that there are no logs in the project.</p>