diff --git a/query/executor.go b/query/executor.go index 1f7bf43d00b..810acc17770 100644 --- a/query/executor.go +++ b/query/executor.go @@ -298,26 +298,7 @@ func initQueryLogWriter(log *zap.Logger, e *Executor, path string) (*os.File, er return nil, err } - // If existing logger is a noop then we will just want to log to the provided file - if e.Logger == zap.NewNop() { - existingCore := log.Core() - - encoderConfig := zap.NewProductionEncoderConfig() - - core := zapcore.NewCore( - zapcore.NewJSONEncoder(encoderConfig), - zapcore.Lock(logFile), - zapcore.InfoLevel, - ) - newCore := zapcore.NewTee(existingCore, core) - - e.Logger = zap.New(newCore).With(zap.String("service", "query")) - e.TaskManager.Logger = e.Logger - return logFile, nil - } - - // If the existing logger exists we just need to register the file to it in order to write to as well - existingCore := e.Logger.Core() + existingCore := log.Core() encoderConfig := zap.NewProductionEncoderConfig()