Skip to content

Commit

Permalink
Output type is now private
Browse files Browse the repository at this point in the history
  • Loading branch information
akyoto committed Jul 6, 2018
1 parent a2ca8c6 commit 0057b11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Log.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const flushThreshold = bufferSize / 2
// e.g. "web", "database", "api" or other categories. It can be connected
// to multiple outputs.
type Log struct {
outputs []*Output
outputs []*output
}

// New creates a new Log.
Expand All @@ -36,12 +36,12 @@ func New() *Log {

// AddOutput adds an output to the log.
func (log *Log) AddOutput(writer io.Writer) {
output := &Output{
out := &output{
writer: writer,
messageBuffer: make([]byte, 0, bufferSize),
}

log.outputs = append(log.outputs, output)
log.outputs = append(log.outputs, out)
}

// Info writes non-critical information to the log.
Expand Down
4 changes: 2 additions & 2 deletions Output.go → output.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"
)

// Output ...
type Output struct {
// output represents a buffered device that can be used to write log messages to.
type output struct {
writer io.Writer
mutex sync.Mutex
messageBuffer []byte
Expand Down

0 comments on commit 0057b11

Please sign in to comment.