Commit ed7d7b40 authored by Taylor Gerring's avatar Taylor Gerring

Split file cleanup

parent 41d80ba1
...@@ -17,19 +17,6 @@ import ( ...@@ -17,19 +17,6 @@ import (
"os" "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 type LogLevel uint32
const ( const (
......
...@@ -6,6 +6,14 @@ import ( ...@@ -6,6 +6,14 @@ import (
"sync/atomic" "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. // NewStdLogSystem creates a LogSystem that prints to the given writer.
// The flag values are defined package log. // 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) LogSystem {
......
...@@ -4,6 +4,11 @@ import ( ...@@ -4,6 +4,11 @@ import (
"sync" "sync"
) )
type message struct {
level LogLevel
msg string
}
var ( var (
logMessageC = make(chan message) logMessageC = make(chan message)
addSystemC = make(chan LogSystem) addSystemC = make(chan LogSystem)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment