From 51062863a5c34d81e296cf15c61140911037cf3b Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 6 Aug 2018 21:47:05 +0200 Subject: Use mod vendor for vendored directory (backwards compatible) --- vendor/github.com/alecthomas/log4go/.gitignore | 2 + vendor/github.com/alecthomas/log4go/README | 14 ++++++ .../log4go/examples/ConsoleLogWriter_Manual.go | 14 ------ .../log4go/examples/FileLogWriter_Manual.go | 57 ---------------------- .../log4go/examples/SimpleNetLogServer.go | 42 ---------------- .../log4go/examples/SocketLogWriter_Manual.go | 18 ------- .../log4go/examples/XMLConfigurationExample.go | 13 ----- 7 files changed, 16 insertions(+), 144 deletions(-) create mode 100644 vendor/github.com/alecthomas/log4go/.gitignore create mode 100644 vendor/github.com/alecthomas/log4go/README delete mode 100644 vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go delete mode 100644 vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go delete mode 100644 vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go delete mode 100644 vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go delete mode 100644 vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go (limited to 'vendor/github.com/alecthomas') diff --git a/vendor/github.com/alecthomas/log4go/.gitignore b/vendor/github.com/alecthomas/log4go/.gitignore new file mode 100644 index 00000000..f6207cd8 --- /dev/null +++ b/vendor/github.com/alecthomas/log4go/.gitignore @@ -0,0 +1,2 @@ +*.sw[op] +.DS_Store diff --git a/vendor/github.com/alecthomas/log4go/README b/vendor/github.com/alecthomas/log4go/README new file mode 100644 index 00000000..3361567f --- /dev/null +++ b/vendor/github.com/alecthomas/log4go/README @@ -0,0 +1,14 @@ +# This is an unmaintained fork, left only so it doesn't break imports. + +Please see http://log4go.googlecode.com/ + +Installation: +- Run `goinstall log4go.googlecode.com/hg` + +Usage: +- Add the following import: +import l4g "log4go.googlecode.com/hg" + +Acknowledgements: +- pomack + For providing awesome patches to bring log4go up to the latest Go spec diff --git a/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go deleted file mode 100644 index 698dd332..00000000 --- a/vendor/github.com/alecthomas/log4go/examples/ConsoleLogWriter_Manual.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "time" -) - -import l4g "code.google.com/p/log4go" - -func main() { - log := l4g.NewLogger() - defer log.Close() - log.AddFilter("stdout", l4g.DEBUG, l4g.NewConsoleLogWriter()) - log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02")) -} diff --git a/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go deleted file mode 100644 index efd596aa..00000000 --- a/vendor/github.com/alecthomas/log4go/examples/FileLogWriter_Manual.go +++ /dev/null @@ -1,57 +0,0 @@ -package main - -import ( - "bufio" - "fmt" - "io" - "os" - "time" -) - -import l4g "code.google.com/p/log4go" - -const ( - filename = "flw.log" -) - -func main() { - // Get a new logger instance - log := l4g.NewLogger() - - // Create a default logger that is logging messages of FINE or higher - log.AddFilter("file", l4g.FINE, l4g.NewFileLogWriter(filename, false)) - log.Close() - - /* Can also specify manually via the following: (these are the defaults) */ - flw := l4g.NewFileLogWriter(filename, false) - flw.SetFormat("[%D %T] [%L] (%S) %M") - flw.SetRotate(false) - flw.SetRotateSize(0) - flw.SetRotateLines(0) - flw.SetRotateDaily(false) - log.AddFilter("file", l4g.FINE, flw) - - // Log some experimental messages - log.Finest("Everything is created now (notice that I will not be printing to the file)") - log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02")) - log.Critical("Time to close out!") - - // Close the log - log.Close() - - // Print what was logged to the file (yes, I know I'm skipping error checking) - fd, _ := os.Open(filename) - in := bufio.NewReader(fd) - fmt.Print("Messages logged to file were: (line numbers not included)\n") - for lineno := 1; ; lineno++ { - line, err := in.ReadString('\n') - if err == io.EOF { - break - } - fmt.Printf("%3d:\t%s", lineno, line) - } - fd.Close() - - // Remove the file so it's not lying around - os.Remove(filename) -} diff --git a/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go b/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go deleted file mode 100644 index 83c80ad1..00000000 --- a/vendor/github.com/alecthomas/log4go/examples/SimpleNetLogServer.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "net" - "os" -) - -var ( - port = flag.String("p", "12124", "Port number to listen on") -) - -func e(err error) { - if err != nil { - fmt.Printf("Erroring out: %s\n", err) - os.Exit(1) - } -} - -func main() { - flag.Parse() - - // Bind to the port - bind, err := net.ResolveUDPAddr("0.0.0.0:" + *port) - e(err) - - // Create listener - listener, err := net.ListenUDP("udp", bind) - e(err) - - fmt.Printf("Listening to port %s...\n", *port) - for { - // read into a new buffer - buffer := make([]byte, 1024) - _, _, err := listener.ReadFrom(buffer) - e(err) - - // log to standard output - fmt.Println(string(buffer)) - } -} diff --git a/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go b/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go deleted file mode 100644 index 400b698c..00000000 --- a/vendor/github.com/alecthomas/log4go/examples/SocketLogWriter_Manual.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "time" -) - -import l4g "code.google.com/p/log4go" - -func main() { - log := l4g.NewLogger() - log.AddFilter("network", l4g.FINEST, l4g.NewSocketLogWriter("udp", "192.168.1.255:12124")) - - // Run `nc -u -l -p 12124` or similar before you run this to see the following message - log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02")) - - // This makes sure the output stream buffer is written - log.Close() -} diff --git a/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go b/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go deleted file mode 100644 index 164c2add..00000000 --- a/vendor/github.com/alecthomas/log4go/examples/XMLConfigurationExample.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import l4g "code.google.com/p/log4go" - -func main() { - // Load the configuration (isn't this easy?) - l4g.LoadConfiguration("example.xml") - - // And now we're ready! - l4g.Finest("This will only go to those of you really cool UDP kids! If you change enabled=true.") - l4g.Debug("Oh no! %d + %d = %d!", 2, 2, 2+2) - l4g.Info("About that time, eh chaps?") -} -- cgit v1.2.3