diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-22 00:26:54 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-22 00:26:54 +0800 |
commit | ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31 (patch) | |
tree | 366e6c09239233aae3b5202fe80bc5231f6e7202 /logger | |
parent | 41d80ba17bac2d6cfefb8a1c6206fe1ccee04d1d (diff) | |
download | go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar.gz go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar.bz2 go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar.lz go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar.xz go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.tar.zst go-tangerine-ed7d7b405e1de8010f2ddeecf2b3798e2f07ad31.zip |
Split file cleanup
Diffstat (limited to 'logger')
-rw-r--r-- | logger/loggers.go | 13 | ||||
-rw-r--r-- | logger/logsystem.go | 8 | ||||
-rw-r--r-- | logger/sys.go | 5 |
3 files changed, 13 insertions, 13 deletions
diff --git a/logger/loggers.go b/logger/loggers.go index 497060fdb..77d111974 100644 --- a/logger/loggers.go +++ b/logger/loggers.go @@ -17,19 +17,6 @@ import ( "os" ) -// LogSystem is implemented by log output devices. -// All methods can be called concurrently from multiple goroutines. -type LogSystem interface { - GetLogLevel() LogLevel - SetLogLevel(i LogLevel) - LogPrint(LogLevel, string) -} - -type message struct { - level LogLevel - msg string -} - type LogLevel uint32 const ( diff --git a/logger/logsystem.go b/logger/logsystem.go index 3601e926c..8458b938f 100644 --- a/logger/logsystem.go +++ b/logger/logsystem.go @@ -6,6 +6,14 @@ import ( "sync/atomic" ) +// LogSystem is implemented by log output devices. +// All methods can be called concurrently from multiple goroutines. +type LogSystem interface { + GetLogLevel() LogLevel + SetLogLevel(i LogLevel) + LogPrint(LogLevel, string) +} + // 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 { diff --git a/logger/sys.go b/logger/sys.go index 5b48241c2..59b8582f9 100644 --- a/logger/sys.go +++ b/logger/sys.go @@ -4,6 +4,11 @@ import ( "sync" ) +type message struct { + level LogLevel + msg string +} + var ( logMessageC = make(chan message) addSystemC = make(chan LogSystem) |