Split file cleanup

This commit is contained in:
Taylor Gerring 2015-01-21 10:26:54 -06:00
parent 41d80ba17b
commit ed7d7b405e
3 changed files with 13 additions and 13 deletions

View File

@ -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 (

View File

@ -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 {

View File

@ -4,6 +4,11 @@ import (
"sync"
)
type message struct {
level LogLevel
msg string
}
var (
logMessageC = make(chan message)
addSystemC = make(chan LogSystem)