Where can one read logs created by calling function:
log.Print("Message")
The tab "Logs" under Main seems to only display information about what URLs were called, but without any debug information that would be displayed by the application.
As described in the documentation, you should use the Context
interface to log instead of log
, if you want your logs to show up in the console.
c := appengine.NewContext(r)
c.Infof("Requested URL: %v", r.URL)
If you are using the new App Engine package google.golang.org/appengine, in the README:
- Logging methods that were on
appengine.Context
are now functions ingoogle.golang.org/appengine/log
So you should use
c := appengine.NewContext(r)
log.Infof(c, "Requested URL: %v", r.URL)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With