summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-12 15:08:58 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-12 16:37:29 -0400
commit84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (patch)
tree8bfa567d2b6381f4a996ada2deff8a16aa85a3ac /Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go
parentd1efb66ad7b017f0fbfe6f0c20843b30f396e504 (diff)
downloadchat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.gz
chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.bz2
chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.zip
Updating go depencancies. Switching to go1.6 vendoring (#2949)
Diffstat (limited to 'Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go')
-rw-r--r--Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go49
1 files changed, 0 insertions, 49 deletions
diff --git a/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go b/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go
deleted file mode 100644
index 8a941e269..000000000
--- a/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2010, Kyle Lemons <kyle@kylelemons.net>. All rights reserved.
-
-package log4go
-
-import (
- "fmt"
- "io"
- "os"
- "time"
-)
-
-var stdout io.Writer = os.Stdout
-
-// This is the standard writer that prints to standard output.
-type ConsoleLogWriter struct {
- format string
- w chan *LogRecord
-}
-
-// This creates a new ConsoleLogWriter
-func NewConsoleLogWriter() *ConsoleLogWriter {
- consoleWriter := &ConsoleLogWriter{
- format: "[%T %D] [%L] (%S) %M",
- w: make(chan *LogRecord, LogBufferLength),
- }
- go consoleWriter.run(stdout)
- return consoleWriter
-}
-func (c *ConsoleLogWriter) SetFormat(format string) {
- c.format = format
-}
-func (c *ConsoleLogWriter) run(out io.Writer) {
- for rec := range c.w {
- fmt.Fprint(out, FormatLogRecord(c.format, rec))
- }
-}
-
-// This is the ConsoleLogWriter's output method. This will block if the output
-// buffer is full.
-func (c *ConsoleLogWriter) LogWrite(rec *LogRecord) {
- c.w <- rec
-}
-
-// Close stops the logger from sending messages to standard output. Attempts to
-// send log messages to this logger after a Close have undefined behavior.
-func (c *ConsoleLogWriter) Close() {
- close(c.w)
- time.Sleep(50 * time.Millisecond) // Try to give console I/O time to complete
-}