So, I have recently changed a Google App Engine service from automatic scaling to basic scaling. Works fine in production. With my development environment (Eclipse), the log output from the instance is not captured or shown anywhere for this service whilst it is configured for basic scaling. I see the normal log output during startup (the service actually creates 3 jetty processes: a "main" jetty and 2 others called instance 0 and instance 1), but nothing when the service processes a request. Other services that I run in dev at the same time output their logs fine (but they are automatic scaling).
It is worth noting that, this is still on Java 8 standard environment, which I know is now not supported, but in the short term it needs to stay on 8. (As an aside, there is an experimental setting on App Engine that will allow Java 8 deployments still).
When I change the scaling back to automatic (and that is the only change), it all works fine and the log output is seen again as expected.
I am enabling basic scaling by simply adding the following to the appengine-web.xml file:
<basic-scaling>
<idle-timeout>5m</idle-timeout>
<max-instances>10</max-instances>
</basic-scaling>
As a very basic test I have setup a static file that is served by the service, and the file is requested and received correctly when either basic or automatic scaling is used, it is just that with basic scaling, I don't see any log output. For example, with the following line in the servlet
LOG.info("Foo bar");
I would expect to see something like the following in my console log window:
Feb 29, 2024 10:21:58 AM com.example.servlet doGet
INFO: Foo bar
but I get silence. Nothing. I am guessing it is related to the 3 jetty instances that are running - main being like a "load balancer" and instances 0 and 1 doing the actual work and Eclipse is not redirecting the output to the Console window.
I have spent the last day or so sifting through search results to get a hint of what I've got wrong, but cannot find anything. This is a similar issue but has no answer.