Repository: incubator-htrace Updated Branches: refs/heads/master be749f1c5 -> 5a6839439
HTRACE-289. Fix TraceEnabled, etc. logger methods for conditional logging (Masatake Iwasaki via Colin P. McCabe) Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/5a683943 Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/5a683943 Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/5a683943 Branch: refs/heads/master Commit: 5a68394399ef4e7a1db22962e97d7f3e28dc7d47 Parents: be749f1 Author: Colin P. Mccabe <[email protected]> Authored: Sun Nov 1 17:31:47 2015 -0800 Committer: Colin P. Mccabe <[email protected]> Committed: Sun Nov 1 17:31:47 2015 -0800 ---------------------------------------------------------------------- htrace-htraced/go/src/org/apache/htrace/common/log.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/5a683943/htrace-htraced/go/src/org/apache/htrace/common/log.go ---------------------------------------------------------------------- diff --git a/htrace-htraced/go/src/org/apache/htrace/common/log.go b/htrace-htraced/go/src/org/apache/htrace/common/log.go index 305ecf3..c29195e 100644 --- a/htrace-htraced/go/src/org/apache/htrace/common/log.go +++ b/htrace-htraced/go/src/org/apache/htrace/common/log.go @@ -271,23 +271,23 @@ func (lg *Logger) Write(level Level, str string) { // func (lg *Logger) TraceEnabled() bool { - return lg.Level >= TRACE + return lg.Level <= TRACE } func (lg *Logger) DebugEnabled() bool { - return lg.Level >= DEBUG + return lg.Level <= DEBUG } func (lg *Logger) InfoEnabled() bool { - return lg.Level >= INFO + return lg.Level <= INFO } func (lg *Logger) WarnEnabled() bool { - return lg.Level >= WARN + return lg.Level <= WARN } func (lg *Logger) ErrorEnabled() bool { - return lg.Level >= ERROR + return lg.Level <= ERROR } func (lg *Logger) Close() {
