refactor(server.go) do not construct the string if not necessary
parent
3deb46e6f5
commit
1c6f2fcd27
|
@ -1324,9 +1324,13 @@ func (s *server) readConf() error {
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
|
|
||||||
func (s *server) debugln(v ...interface{}) {
|
func (s *server) debugln(v ...interface{}) {
|
||||||
|
if logLevel > Debug {
|
||||||
debugf("[%s Term:%d] %s", s.name, s.Term(), fmt.Sprintln(v...))
|
debugf("[%s Term:%d] %s", s.name, s.Term(), fmt.Sprintln(v...))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *server) traceln(v ...interface{}) {
|
func (s *server) traceln(v ...interface{}) {
|
||||||
|
if logLevel > Trace {
|
||||||
tracef("[%s] %s", s.name, fmt.Sprintln(v...))
|
tracef("[%s] %s", s.name, fmt.Sprintln(v...))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue