Browse Source

fix build failed on aarch64 (#1132)

master
Lunny Xiao GitHub 8 years ago
parent
commit
fa41ddd3eb
4 changed files with 24 additions and 6 deletions
  1. +18
    -0
      vendor/github.com/ngaut/log/crash_darwin.go
  2. +2
    -2
      vendor/github.com/ngaut/log/crash_unix.go
  3. +1
    -1
      vendor/github.com/ngaut/log/log.go
  4. +3
    -3
      vendor/vendor.json

+ 18
- 0
vendor/github.com/ngaut/log/crash_darwin.go View File

@@ -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)
}
}

+ 2
- 2
vendor/github.com/ngaut/log/crash_unix.go View File

@@ -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)
}
}

+ 1
- 1
vendor/github.com/ngaut/log/log.go View File

@@ -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 {


+ 3
- 3
vendor/vendor.json View File

@@ -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=",


Loading…
Cancel
Save