doubengman2072 2012-01-31 03:31
浏览 43
已采纳

GAE Golang-log.Print()?

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.

  • 写回答

3条回答 默认 最新

  • donglu9743 2012-01-31 12:18
    关注

    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)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?