chat log to stdout

This commit is contained in:
sm
2015-04-05 23:00:44 -07:00
parent 287574622a
commit ccd7e8353b
3 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package chat
import (
"fmt"
"net/http"
"sync"
@@ -54,7 +55,7 @@ func (c *Chat) Sender() {
select {
case msg := <-c.chatter:
c.ulock.Lock()
logs.Debug("got message: %q", msg)
fmt.Println(msg)
for name, user := range c.users {
logs.Debug("\tsending %s: %q", name, msg)
user.send <- msg