Hooray, I found a log location.  Tucked away in the safe_process.py debug 
output. By starting the with gcloud with a verbosity of debug (i.e. gcloud 
preview app run ./app.yaml --verbosity debug) it shows a setting of 
APP_ENGINE_LOG_CONFIG_PATTERN which indicated (for me) where logs were 
going.

e.g. 
DEBUG    2015-08-20 03:39:22,137 safe_subprocess.py:60] Starting process 
['/usr/lib/jvm/java-7-oracle/bin/java', 
'-Dgcloud.java.application=/home/matt/src/java/blah/build', 
'-Djetty.home=/home/matt/google-cloud-sdk/platform/google_appengine/google/appengine/javamanagedvm/appengine-java-vmruntime',
 
'-Djetty.base=/home/matt/google-cloud-sdk/platform/google_appengine/google/appengine/jettybasesdk',
 
'-jar', ...* 'APP_ENGINE_LOG_CONFIG_PATTERN': '/tmp/tmpMupjUTgae/log.%g',* 
'TZ': 'UTC', 'SDKROOT': '/home/google-cloud-sdk/platform/google_appengine', 
'GAE_LONG_APP_ID': 'asd-87623', 'GAE_MODULE_INSTANCE': '0'}, cwd='/home/' 
...

Inconvenient, as it changes every time, but it'll work for now.  I'd love 
to hear of a way to override this or better yet get it into the main 
terminal window.



On Wednesday, August 19, 2015 at 3:17:41 PM UTC-6, Matt Self wrote:
>
> Ok, based on this thread (
> https://code.google.com/p/google-cloud-sdk/issues/detail?id=163) it seems 
> that gcloud defaults to "docker-less" local development. Unfortunately, 
> when this is the case I can't seem to get application logs to appear in the 
> console (or anywhere else for that matter).  I see that it falls back on 
> using devappserver2.py / jetty, but I'm not sure where stdout is getting 
> redirected.  I do see general request handling logging in the main console 
> window, but no application logging gets out.  This is not the case if I use 
> mvn gcloud:run which logs just fine (to docker).
>
>
> Again, if I use mvn gcloud:run, it defaults to using docker, and I am able 
> to find my logs by ssh-ing into the running container (in 
> /var/logs/appengine).  But when running via 'gcloud preview app run' I get 
> no app logs.
>
>
> So, two questions: 
>
> First, where are the logs when running (dockerless) 'gcloud preview app 
> run'?  I have everything set up correctly (and can confirm that app log 
> messages are redirected from stdout to file when running within docker 
> container via mvn gcloud:run).
>
>
> Second, is it possible to use the 'gcloud preview app run' with a flag to 
> indicate that it should run in docker "mode"?  A flag could be a work 
> around for me and would be handy in any case (as I typically launch from 
> the gcloud toolset so i can use a dispatcher.yaml and other app.yaml 
> modules).
>
>
> Any insight into this is appreciated. Thanks for the help.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9c1f6d5a-958f-462d-b0a3-8bcfd9096aa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to