mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
*: Fix log level setting in logrus
Setting the Level field of a logrus logger doesn't actually do anything since the Level field simply reports the log level of the last log message emitted on the logger. The right way to do that is to set logger.Logger.Level. Also cleans up newline characters from log messages emitted through logrus and fixes the direction of the arrows in the messages emitted by rpccommon, which was inconsistent with the arrows of gdbserial.
This commit is contained in:
@ -69,7 +69,7 @@ type Config struct {
|
||||
// new process.
|
||||
func New(config *Config, processArgs []string) (*Debugger, error) {
|
||||
logger := logrus.New().WithFields(logrus.Fields{"layer": "debugger"})
|
||||
logger.Level = logrus.DebugLevel
|
||||
logger.Logger.Level = logrus.DebugLevel
|
||||
if !logflags.Debugger() {
|
||||
logger.Logger.Out = ioutil.Discard
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user