gitlabhq/gitlab-shell — pull request #56 by smashwilson (2013-05-18 20:13:53+00:00)
Title: Logger

Addresses #36.

Implemented a simple global logger and added logging calls throughout the codebase. Hopefully it'll be useful in diagnosing problems, auditing user access, and all sorts of fun stuff.

The log file and logging level are controllable via settings in `config.yml`, as is the level of user auditing. By default, only user keys ids are reported in the log; if `audit_usernames` is set to `true`, an extra API call to `discover` is done and the real username is shown.

All HTTP requests are logged at `:debug`, but failed (non-200) responses are logged at `:error`.

Fleshed out a few specs along the way (`gitlab_project_spec` in particular) to handle various failure cases.