Clean up logging a little

This commit is contained in:
Marc Di Luzio 2020-06-27 02:02:18 +01:00
parent 5bbb2ff37f
commit 5b5f80be7d
2 changed files with 2 additions and 5 deletions

View file

@ -68,8 +68,7 @@ func (a *accountantServer) GetValue(_ context.Context, in *accounts.DataKey) (*a
a.sync.RLock() a.sync.RLock()
defer a.sync.RUnlock() defer a.sync.RUnlock()
// Try and fetch the rover // Try and fetch the value
log.Printf("Getting value for account %s: %s\n", in.Account, in.Key)
data, err := a.accountant.GetValue(in.Account, in.Key) data, err := a.accountant.GetValue(in.Account, in.Key)
if err != nil { if err != nil {
log.Printf("Error: %s\n", err) log.Printf("Error: %s\n", err)

View file

@ -430,16 +430,14 @@ func (w *World) ExecuteCommandQueues() {
// ExecuteCommand will execute a single command // ExecuteCommand will execute a single command
func (w *World) ExecuteCommand(c *Command, rover string) (err error) { func (w *World) ExecuteCommand(c *Command, rover string) (err error) {
log.Printf("Executing command: %+v\n", *c) log.Printf("Executing command: %+v for %s\n", *c, rover)
switch c.Command { switch c.Command {
case CommandMove: case CommandMove:
if dir, err := bearing.FromString(c.Bearing); err != nil { if dir, err := bearing.FromString(c.Bearing); err != nil {
return err return err
} else if _, err := w.MoveRover(rover, dir); err != nil { } else if _, err := w.MoveRover(rover, dir); err != nil {
return err return err
} }
case CommandStash: case CommandStash: