go-logging icon indicating copy to clipboard operation
go-logging copied to clipboard

How to set the log file path?

Open shaohk opened this issue 8 years ago • 3 comments

I want to set the log file path,How to config it?

shaohk avatar Oct 31 '17 08:10 shaohk

You must open the log file first.

yuan1238y avatar Nov 09 '17 08:11 yuan1238y

我能说中文吗? T.T,请问怎么打开日志文件呀?

shaohk avatar Nov 10 '17 09:11 shaohk

f, _ := os.Create("/tmp/log.log")
backend := logging.NewLogBackend(f, "", 0)

liuqing6767 avatar Apr 03 '18 14:04 liuqing6767