log, internal/debug: delete RotatingFileHandler (#20586)

* log: delete RotatingFileHandler

We added this for the dashboard, which is gone now. The
handler never really worked well and had data race and file
handling issues.

* internal/debug: remove unused RotatingFileHandler setup code
This commit is contained in:
Felix Lange
2020-01-21 13:57:33 +01:00
committed by Péter Szilágyi
parent ad2fc7c6a6
commit 31baf3a9af
4 changed files with 3 additions and 124 deletions

View File

@ -112,20 +112,9 @@ func init() {
// Setup initializes profiling and logging based on the CLI flags.
// It should be called as early as possible in the program.
func Setup(ctx *cli.Context, logdir string) error {
func Setup(ctx *cli.Context) error {
// logging
log.PrintOrigins(ctx.GlobalBool(debugFlag.Name))
if logdir != "" {
rfh, err := log.RotatingFileHandler(
logdir,
262144,
log.JSONFormatOrderedEx(false, true),
)
if err != nil {
return err
}
glogger.SetHandler(log.MultiHandler(ostream, rfh))
}
glogger.Verbosity(log.Lvl(ctx.GlobalInt(verbosityFlag.Name)))
glogger.Vmodule(ctx.GlobalString(vmoduleFlag.Name))
glogger.BacktraceAt(ctx.GlobalString(backtraceAtFlag.Name))