aboutsummaryrefslogtreecommitdiffstats
path: root/logger/loggers.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-23 04:43:58 +0800
committerobscuren <geffobscura@gmail.com>2015-03-23 04:43:58 +0800
commit59eab49cb849ca93b9608763f4842654e8044d0f (patch)
tree8a04499cb63dd8d91fd136f65c29605844c5bae8 /logger/loggers.go
parent8ed4f226d1dbecc9625a2f142e22926569198b73 (diff)
parent8b1b9fc99d63a19c216edebc07096718e835937d (diff)
downloadgo-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar.gz
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar.bz2
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar.lz
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar.xz
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.tar.zst
go-tangerine-59eab49cb849ca93b9608763f4842654e8044d0f.zip
Merge branch 'ethersphere-jsonlog' into develop
Diffstat (limited to 'logger/loggers.go')
-rw-r--r--logger/loggers.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/logger/loggers.go b/logger/loggers.go
index 25263853a..42c8cbc07 100644
--- a/logger/loggers.go
+++ b/logger/loggers.go
@@ -28,7 +28,6 @@ const (
InfoLevel
DebugLevel
DebugDetailLevel
- JsonLevel = 1000
)
// A Logger prints messages prefixed by a given tag. It provides named
@@ -43,11 +42,11 @@ func NewLogger(tag string) *Logger {
}
func (logger *Logger) Sendln(level LogLevel, v ...interface{}) {
- logMessageC <- message{level, logger.tag + fmt.Sprintln(v...)}
+ logMessageC <- stdMsg{level, logger.tag + fmt.Sprintln(v...)}
}
func (logger *Logger) Sendf(level LogLevel, format string, v ...interface{}) {
- logMessageC <- message{level, logger.tag + fmt.Sprintf(format, v...)}
+ logMessageC <- stdMsg{level, logger.tag + fmt.Sprintf(format, v...)}
}
// Errorln writes a message with ErrorLevel.
@@ -129,6 +128,6 @@ func (logger *JsonLogger) LogJson(v JsonLog) {
}
jsontxt, _ := json.Marshal(obj)
- logMessageC <- message{JsonLevel, string(jsontxt)}
+ logMessageC <- (jsonMsg(jsontxt))
}