mozilla/makedrive — pull request #415 by humphd (2014-10-14 16:40:57+00:00)
Title: Record and log more and better info about connected clients.

I really have wanted better details in our logs about clients/syncs. This is a step in that direction:

```
[2014-10-14T16:27:42.838Z] INFO: MakeDrive/36257 on hospitality-5.local: Client connected
client: {
"username": "humphd",
"id": "49e93bb8-d319-4f07-b0fa-0708e71f4f08",
"state": "CONNECTING",
"path": "/",
"agent": "Chrome 38.0.2125 / Mac OS X 10.6.8",
"device": "Other 0.0.0",
"downstreamSyncs": 0,
"upstreamSyncs": 0
}
[2014-10-14T16:27:43.706Z] INFO: MakeDrive/36257 on hospitality-5.local: Completed downstream sync to client in 863 ms
client: {
"username": "humphd",
"id": "49e93bb8-d319-4f07-b0fa-0708e71f4f08",
"state": "LISTENING",
"path": "/",
"agent": "Chrome 38.0.2125 / Mac OS X 10.6.8",
"device": "Other 0.0.0",
"downstreamSyncs": 1,
"upstreamSyncs": 0
}
```

This adds a `ClientInfo` module that tracks client info by client id, and deals with extracting data about browser/device, how many times we've synced, how long the last sync took, etc.

Later we should probably refactor this a bit to add `SyncInfo` that can track more detailed info about a sync (number of files, size of files, ...).