Skip to content

google.golang.org/appengine/log isn't compatible with GAE/Go 1.11 #163

@apstndb

Description

@apstndb

I am trying to migrate apps with App Engine API to Go 1.11 runtime for App Engine standard.
google.golang.org/appengine/log seems broken in Go 1.11 runtime because log loss is happen.

Example to reproduce

package main

import (
	"google.golang.org/appengine"
	"google.golang.org/appengine/log"
	"net/http"
)

func main() {
	http.HandleFunc("/write_log_gae", func(w http.ResponseWriter, req *http.Request) {
		ctx := appengine.NewContext(req)
		log.Infof(ctx, "test")
		w.WriteHeader(http.StatusOK)
	})
	appengine.Main()
}

Single call of /write_log_gae emits three top level logs.

  • request log in request
  • log level prefixed line in stderr
  • internal.flushLog RPC log in stderr

Frequently, RPC log says Call error 3: invalid security ticket and request log doesn't have apps log.

This screenshot is result of calling twice. The bottom half doesn't have app log(Severity is not set from child.)
2018-10-17 13 37 56

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions