jquery/download.jqueryui.com — pull request #3 by rxaviers (2012-07-20 14:53:43+00:00)
Title: Log download statistics and errors on "downloads.log"

1st Draft. Follow an example of the download-statistic-log output:

```
2012-07-20T14:29:56.852Z - info: {"components":["widget","core","mouse","position","draggable","droppable","resizable","selectable","sortable","accordion","autocomplete","button","datepicker","dialog","menu","progressbar","slider","spinner","tabs","tooltip","effect","effect-blind","effect-bounce","effect-clip","effect-drop","effect-explode","effect-fade","effect-fold","effect-highlight","effect-pulsat
e","effect-scale","effect-shake","effect-slide","effect-transfer"],"build_time":978}
```

Dependecy added:
- [winston](https://github.com/flatiron/winston#using-custom-logging-levels): logging lib;

Questions:

1) Shall we use a separate file for statistics (downloads.log) vs. errors (download_errors?.log)?
2) JSON or key-value pairs in the log output? [Splunk](http://dev.splunk.com/view/SP-CAAADP6) doc tells both are ok, as far as I understood;

> Log each download with the following data: Selected components, selected theme (or "custom"), time to generate zip, time to handle request

3) I'm logging selected components, selected theme (or "custom"), time to generate zip. The time to handle request is logged via connect.logger. Should we log it as well in download stats as well? Why?