Skip to content

Commit

Permalink
log now autoswitches to stdout if stderr is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jul 16, 2024
1 parent d8c5cfd commit 9396c9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.5

require (
fortio.org/cli v1.7.0
fortio.org/log v1.15.0-pre1
fortio.org/log v1.15.0-pre2
github.com/google/go-cmp v0.6.0 // only for tests
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fortio.org/cli v1.7.0 h1:w+uXZLGi4t3Vn/BvbeMuSw84Z1pvNPG9HqeGfpP68cc=
fortio.org/cli v1.7.0/go.mod h1:s4vxWz7P7T4cYOWdMF0NA693Nu1gK9OW4KoDj54/Do4=
fortio.org/log v1.15.0-pre1 h1:jg4lj4NMPqd+JFGCo4Y0wXHl2OPMk9BMxt0Dd01xtJw=
fortio.org/log v1.15.0-pre1/go.mod h1:1tnXMqd5rZAgvSeHJkD2xXpyXRBzdeXtKLZuzNLIwtA=
fortio.org/log v1.15.0-pre2 h1:lVlwcOSHMAva7MGn14ZXwHax8VB06GyQn8L9WTbQJPg=
fortio.org/log v1.15.0-pre2/go.mod h1:1tnXMqd5rZAgvSeHJkD2xXpyXRBzdeXtKLZuzNLIwtA=
fortio.org/struct2env v0.4.1 h1:rJludAMO5eBvpWplWEQNqoVDFZr4RWMQX7RUapgZyc0=
fortio.org/struct2env v0.4.1/go.mod h1:lENUe70UwA1zDUCX+8AsO663QCFqYaprk5lnPhjD410=
fortio.org/version v1.0.4 h1:FWUMpJ+hVTNc4RhvvOJzb0xesrlRmG/a+D6bjbQ4+5U=
Expand Down
5 changes: 0 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package main
import (
"flag"
"os"
"runtime"

"fortio.org/cli"
"fortio.org/log"
Expand All @@ -13,10 +12,6 @@ import (
)

func main() {
if runtime.GOARCH == "wasm" {
log.SetOutput(os.Stdout)
log.Infof("wasm detected, adjusted logger to stdout.")
}
showParse := flag.Bool("parse", false, "show parse tree")
showEval := flag.Bool("eval", true, "show eval results")
sharedState := flag.Bool("shared-state", false, "All files share same interpreter state (default is new state for each)")
Expand Down

0 comments on commit 9396c9b

Please sign in to comment.