title: GCP Logging not working after tomcat serves my app
body: <p>So I have this legacy spring framework webapp and I try to add GCP logging for GCP Error Reporting. For all my other spring boot apps, doing this was like 5 minutes of work. But with spring alone is pretty hard.</p>
  <p>After following these instructions: <a href="https://cloud.google.com/logging/docs/setup/java#jul_handler" rel="nofollow noreferrer">https://cloud.google.com/logging/docs/setup/java#jul_handler</a>
  (Adding the library to the pom and updating the logging.properties file). I've got it working, but except for startup logs, I don't see any logs coming in. I wonder if it has to do with the following propety:</p>
  <p>com.google.cloud.logging.LoggingHandler.resourceType=container</p>
  <p>Example of tomcat startup logs, that I do get too see:</p>
  <p>Jul 04, 2022 8:21:51 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1403 ms</p>
  <p>Jul 04, 2022 8:21:51 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Catalina]</p>
  <p>Jul 04, 2022 8:23:28 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 97082 ms</p>
  <p>I'm missing something simple here? Why isn't GCP picking up the rest of the logs? I see catalina.out being populated with all kinds of error or info messages...</p>
  <p>logging.properties:</p>
  <pre><code>handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler, com.google.cloud.logging.LoggingHandle
  r
  .handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler, com.google.cloud.logging.LoggingHandler
  
  io.grpc.netty.level=INFO
  sun.net.level=INFO
  
  ############################################################
  # Handler specific properties.
  # Describes specific configuration info for Handlers.
  ############################################################
  
  1catalina.org.apache.juli.AsyncFileHandler.level = FINE
  1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
  1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
  1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8
  2localhost.org.apache.juli.AsyncFileHandler.level = FINE
  2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
  2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
  2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8
  3manager.org.apache.juli.AsyncFileHandler.level = FINE
  3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
  3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
  3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
  4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
  4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
  4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
  4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
  java.util.logging.ConsoleHandler.level = FINE
  java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
  java.util.logging.ConsoleHandler.encoding = UTF-8
  com.google.cloud.logging.LoggingHandler.log=core-server.log
  com.google.cloud.logging.LoggingHandler.resourceType=container
  
  
  ###########################################################
  # Facility specific properties.
  # Provides extra control for each logger.
  ############################################################
  
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler
  </code></pre>