aboutsummaryrefslogtreecommitdiffstats
path: root/logger
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-24 01:08:49 +0800
committerzelig <viktor.tron@gmail.com>2015-03-24 01:08:49 +0800
commita983a215dc50240615cc1efe5199c72cefe037ed (patch)
tree944331bc2f2cb89b847bef201b7d3851a73a72b0 /logger
parent9880f99ccb81477f1026db68c123aa548297c648 (diff)
downloadgo-tangerine-a983a215dc50240615cc1efe5199c72cefe037ed.tar.gz
go-tangerine-a983a215dc50240615cc1efe5199c72cefe037ed.tar.zst
go-tangerine-a983a215dc50240615cc1efe5199c72cefe037ed.zip
fix ethtest logging
Diffstat (limited to 'logger')
-rw-r--r--logger/logsystem.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/logger/logsystem.go b/logger/logsystem.go
index 995cf4240..4dadb126e 100644
--- a/logger/logsystem.go
+++ b/logger/logsystem.go
@@ -14,17 +14,17 @@ type LogSystem interface {
// NewStdLogSystem creates a LogSystem that prints to the given writer.
// The flag values are defined package log.
-func NewStdLogSystem(writer io.Writer, flags int, level LogLevel) LogSystem {
+func NewStdLogSystem(writer io.Writer, flags int, level LogLevel) *StdLogSystem {
logger := log.New(writer, "", flags)
- return &stdLogSystem{logger, uint32(level)}
+ return &StdLogSystem{logger, uint32(level)}
}
-type stdLogSystem struct {
+type StdLogSystem struct {
logger *log.Logger
level uint32
}
-func (t *stdLogSystem) LogPrint(msg LogMsg) {
+func (t *StdLogSystem) LogPrint(msg LogMsg) {
stdmsg, ok := msg.(stdMsg)
if ok {
if t.GetLogLevel() >= stdmsg.Level() {
@@ -33,11 +33,11 @@ func (t *stdLogSystem) LogPrint(msg LogMsg) {
}
}
-func (t *stdLogSystem) SetLogLevel(i LogLevel) {
+func (t *StdLogSystem) SetLogLevel(i LogLevel) {
atomic.StoreUint32(&t.level, uint32(i))
}
-func (t *stdLogSystem) GetLogLevel() LogLevel {
+func (t *StdLogSystem) GetLogLevel() LogLevel {
return LogLevel(atomic.LoadUint32(&t.level))
}