aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/github.com/ngaut/log/crash_darwin.go18
-rw-r--r--vendor/github.com/ngaut/log/crash_unix.go4
-rw-r--r--vendor/github.com/ngaut/log/log.go2
-rw-r--r--vendor/vendor.json6
4 files changed, 24 insertions, 6 deletions
diff --git a/vendor/github.com/ngaut/log/crash_darwin.go b/vendor/github.com/ngaut/log/crash_darwin.go
new file mode 100644
index 0000000000..14ce5590c2
--- /dev/null
+++ b/vendor/github.com/ngaut/log/crash_darwin.go
@@ -0,0 +1,18 @@
+// +build darwin
+
+package log
+
+import (
+ "log"
+ "os"
+ "syscall"
+)
+
+func CrashLog(file string) {
+ f, err := os.OpenFile(file, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666)
+ if err != nil {
+ log.Println(err.Error())
+ } else {
+ syscall.Dup2(int(f.Fd()), 2)
+ }
+}
diff --git a/vendor/github.com/ngaut/log/crash_unix.go b/vendor/github.com/ngaut/log/crash_unix.go
index 37f407def9..5b9bc23aa2 100644
--- a/vendor/github.com/ngaut/log/crash_unix.go
+++ b/vendor/github.com/ngaut/log/crash_unix.go
@@ -1,4 +1,4 @@
-// +build freebsd openbsd netbsd dragonfly darwin linux
+// +build freebsd openbsd netbsd dragonfly linux
package log
@@ -13,6 +13,6 @@ func CrashLog(file string) {
if err != nil {
log.Println(err.Error())
} else {
- syscall.Dup2(int(f.Fd()), 2)
+ syscall.Dup3(int(f.Fd()), 2, 0)
}
}
diff --git a/vendor/github.com/ngaut/log/log.go b/vendor/github.com/ngaut/log/log.go
index 7e193715bd..896b393095 100644
--- a/vendor/github.com/ngaut/log/log.go
+++ b/vendor/github.com/ngaut/log/log.go
@@ -372,7 +372,7 @@ func genHourTime(t time.Time) string {
}
func New() *logger {
- return Newlogger(os.Stdout, "")
+ return Newlogger(os.Stderr, "")
}
func Newlogger(w io.Writer, prefix string) *logger {
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 78ae8f3ff0..af1bc2cbc6 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -611,10 +611,10 @@
"revisionTime": "2015-08-13T08:49:40Z"
},
{
- "checksumSHA1": "wLXFUHpjYiigLxib/vQZ6RcMM34=",
+ "checksumSHA1": "94Mvr/SU9I9Zl3pBtbHsBPN0LTg=",
"path": "github.com/ngaut/log",
- "revision": "37d3e0f43b4fe05429e1adb75e835bf31fc1bba6",
- "revisionTime": "2015-09-18T08:53:30Z"
+ "revision": "d2af3a61f64d093457fb23b25d20f4ce3cd551ce",
+ "revisionTime": "2017-03-07T01:10:05Z"
},
{
"checksumSHA1": "EcKjGj2rrdhMK90WMmP5gGwGQt8=",