Logging added

This commit is contained in:
2020-10-31 00:09:56 -04:00
parent 9693333236
commit f05990a5c5

View File

@ -21,7 +21,6 @@ func chessCommand(m chat1.MsgSummary) {
return return
} }
if parts[1] == "show" { if parts[1] == "show" {
log.LogInfo("Game found: %+v, %+v", &g, g)
go showBoard(m, &g) go showBoard(m, &g)
return return
} }
@ -78,6 +77,7 @@ func showBoard(m chat1.MsgSummary, g *Game) {
log.LogInfo("Creating board position (g.Game.Position().String())") log.LogInfo("Creating board position (g.Game.Position().String())")
// create board position // create board position
fenStr := g.Game.Position().String() fenStr := g.Game.Position().String()
log.LogInfo("Creating pos &chess.Position{}")
pos := &chess.Position{} pos := &chess.Position{}
if err := pos.UnmarshalText([]byte(fenStr)); err != nil { if err := pos.UnmarshalText([]byte(fenStr)); err != nil {
log.LogError(fmt.Sprintf("Error in ShowBoard pos.UnmasrhalText: %+v\n", err)) log.LogError(fmt.Sprintf("Error in ShowBoard pos.UnmasrhalText: %+v\n", err))