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:
committed by
Péter Szilágyi
parent
ad2fc7c6a6
commit
31baf3a9af
@ -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))
|
||||
|
Reference in New Issue
Block a user