alphagov/govuk_crawler_worker — pull request #57 by mattbostock (2014-08-07 14:25:33+00:00)
Title: [#76505670] Use github.com/golang/glog for logging 

__NB__: Please merge __either__ this PR, or #56, but not both. See #56 for another implementation.

* * *

Use Google's glog package for logging, which enables us to log at
varying levels of severity:

`INFO`, `WARNING`, `ERROR` and `FATAL`

glog is a pure implementation of leveled logs based on Google's C++ package:
http://code.google.com/p/google-glog

The defaults output to temporary files; this can be changed by setting the `-logtostderr` flag to true. The default output shows ERROR and FATAL messages only; this can be changed by setting the `-stderrthreshold` flag[1].

This package also provides the `-log_backtrace_at` flag[2], which will cause a backtrace to be output when execution reaches a logging statement at the location specified in that flag.

[1]:
https://github.com/golang/glog/blob/d1c4472bf2efd3826f2b5bdcc02d8416798d678c/glog.go#L46
[2]:
https://github.com/golang/glog/blob/d1c4472bf2efd3826f2b5bdcc02d8416798d678c/glog.go#L55-L61

* * *

Also, prefer `log.Fatalln` to `log.Fatal` for consistency with our use of `log.Println`. Ensures that a new line
is printed after the log message.