dongshuzui0335 2017-04-03 02:27
浏览 1073
已采纳

如何在Golang中测试日志记录(log.Println)?

How to test below the code in Golang?

package main

import "log"

func main() {
    log.Println("hello world")
}
  • 写回答

1条回答 默认 最新

  • doufei9805 2017-04-03 02:54
    关注

    Your program writes to the log package standard logger which writes to standard error. Compile and run your program and see what appears on standard error.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?