New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging in the v1.11 runtime #176
Comments
I use If you would like an example, let me know |
You can still use
|
Related to this issue, It seems too noisy and useless without structured logging. |
@apstndb thank you for that. I was able to figure out to use Googlers maintaining this project: I suggest that the docs here, which show this example, are changed to state that the recommended way to run an app in go111 is to call |
The recommended way is not to use |
Hi @sbuss |
IMO, the "Migrating your App Engine app from Go 1.9 to Go 1.11" docs seems mainly for migrating to more open APIs rather than for migrating to Go 1.11 runtime. I think that many users want to use Go 1.11 and want to get benefits of 2nd gen runtime as soon as possible but want to stay to use App Engine API unless their migration plan is ready. |
Has anything been done for documenting this? |
Anything happening on the logging issue? Not having log messages grouped by request makes the logging almost useless and is a huge regression from AE standard 1st gen runtimes. (Along with many, many others) It works in 1.11 since you can still use google.golang.org/appengine/log but, according to the docs, it will not work in the future :'( |
You can use the Stackdriver Logging API to group logs by request. Here's an example of how to do so: https://github.com/mtraver/gaelog |
Alternatively, instead of writing the logs to the Stackdriver API synchronously which can be slow, App Engine allows you to write out to virtual "files" that automatically get passed to Stackdriver in the background. It is less well written than the one from @mtraver I'm afraid, but feel free to try this one: https://github.com/a1comms/go-gaelog |
I just wanted to comment on this bug to ensure it isn't lost. To summarize, there appear to be three different 'official' logging packages (Go, appengine, stackdriver) and no clear recommendation between them. |
This is an old bug, but just to save others some trouble: I think that structured logging (almost) works using the google.golang.org/appengine/v2/log package now, as long as you're using the standard environment. It looks like there was a typo in a header name that was fixed by #263, though, so you may need to run |
Issue #154 raises the question of structured logging in general, but it needs to be established what is the correct and recommended way to log messages at the various log levels (Critical/Error/Info, etc.) in the second generation standard environment Go 1.11 runtime. Official documentation here lists the google.golang.org/appengine/log package among the packages that "have been superseded by the Go standard library packages listed below"; instead the standard library "log" package is listed.
The sample app now also uses the standard "log" package.
Yet the appengine/log package does not contain any indication that the package is deprecated for the Go 1.11 runtime. Is it, really? If not, is any additional authentication step needed to use the package now within an app?
How must we now log errors distinctly from info or debug log entries?
The text was updated successfully, but these errors were encountered: