Skip to content

Commit

Permalink
DEBUG log in view demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorbin committed Dec 17, 2017
1 parent 9b6a6d6 commit 176a406
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/view/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"image"
"log"
"math/rand"
"os"

"github.com/borkshop/bork/internal/cops/display"
"github.com/borkshop/bork/internal/input"
Expand Down Expand Up @@ -82,6 +83,12 @@ func (w *world) HandleInput(cmd interface{}) error {
}

func main() {
f, err := os.Create("debug.log")
if err != nil {
log.Fatalln(err)
}
log.SetOutput(f)

if err := view.JustKeepRunning(func(v *view.View) (view.Client, error) {
var w world
w.init()
Expand Down

0 comments on commit 176a406

Please sign in to comment.