Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
マルティーニ ログ パスをランダム ファイルに設定するにはどうすればよいですか。コンソールに表示されるようになりました。
m := martini.Classic()
助けてくれてありがとう
Martini に新しいロガーを接続します。
f, err := os.OpenFile("logfile", os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666) if err != nil { t.Fatalf("error opening file: %v", err) } defer f.Close() m.Map(log.New(f, "[martini]", log.LstdFlags))