make ws recv logs prettier

This commit is contained in:
slice 2018-07-15 21:21:56 -07:00
parent a5a005a1e4
commit 8d517ec037
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
1 changed files with 7 additions and 1 deletions

View File

@ -85,7 +85,13 @@ export default class App extends Component {
this.websocket.onmessage = (message) => {
const { data } = message
const parsed = JSON.parse(data)
log('ws recv:', parsed)
console.log(
'%c>>>%c',
'color: hsla(320, 100%, 50%, 1); font-weight: bold',
'color: inherit; font-weight: inherit',
parsed,
)
this.handlePacket(parsed)
}