Skip to content

Commit

Permalink
Merge pull request gin-gonic#753 from gin-gonic/bug
Browse files Browse the repository at this point in the history
fix gin-gonic#752 ignore appengine os.
  • Loading branch information
javierprovecho authored Dec 3, 2016
2 parents 32cab50 + b26d956 commit 556287f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"io"
"os"
"runtime"
"time"

"golang.org/x/crypto/ssh/terminal"
Expand Down Expand Up @@ -48,8 +49,11 @@ func Logger() HandlerFunc {
// Example: os.Stdout, a file opened in write mode, a socket...
func LoggerWithWriter(out io.Writer, notlogged ...string) HandlerFunc {
isTerm := true
if outFile, ok := out.(*os.File); ok {
isTerm = terminal.IsTerminal(int(outFile.Fd()))

if runtime.GOOS != "appengine" && runtime.GOOS != "netbsd" && runtime.GOOS != "openbsd" {
if outFile, ok := out.(*os.File); ok {
isTerm = terminal.IsTerminal(int(outFile.Fd()))
}
}

var skip map[string]struct{}
Expand Down

0 comments on commit 556287f

Please sign in to comment.