Skip to content

Commit

Permalink
Merge pull request #41 from shatteredsilicon/fix-revel-logging
Browse files Browse the repository at this point in the history
Fix log output taken over by glog
  • Loading branch information
gordan-bobic authored Feb 16, 2025
2 parents d66a054 + 74c3c23 commit 0f0dc9a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package app

import (
"fmt"
"log"
"math/rand"
"net/http"
"os"
Expand Down Expand Up @@ -68,6 +69,11 @@ var AppVersion = ""
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

// package vitess.io/vitess/go/vt/sqlparser imports package github.com/golang/glog,
// and glog changes the output dest of the standard package 'log', we don't want that
// so change it back.
log.SetOutput(os.Stdout)

// CLOUD_API_HOSTNAME is only used for testing and should override api.hostname.
hostname := os.Getenv("CLOUD_API_HOSTNAME")
if hostname == "" {
Expand Down

0 comments on commit 0f0dc9a

Please sign in to comment.