openshift/go-sti — pull request #15 by mfojtik (2014-04-17 14:03:02+00:00)
Title: Added factorlog for better logging

This patch will replace the default `log` with `factorlog`[1] which:

* Make us stop using `if h.debug {}` all the time as you can set the desired severity used for all 'sti' package
* Support for colors ;-) (we can turn it off just by using the default plain formatter)
* Support for custom log formatters (not that useful now, but it might be useful latter)
* It adds the source filename and the line number which is **extra** usefull when debugging (this is enabled only when --debug is set to True, so in normal case the log is conservative)

The output looks like this:

```
[2014-04-17 13:53:19] [DEBUG:docker.go:32] Using docker socket: unix:///var/run/docker.sock
[2014-04-17 13:53:19] [DEBUG:build.go:128] Determining whether image test-ruby-app is compatible with incremental build
[2014-04-17 13:53:20] [INFO:build.go:75] Existing image for tag test-ruby-app detected for incremental build
[2014-04-17 13:53:20] [DEBUG:build.go:140] Performing source build from git://github.com/pmorie/simple-ruby
[2014-04-17 13:53:20] [DEBUG:build.go:265] Saving build artifacts from image test-ruby-app to path /tmp/sti721042307/artifacts
[2014-04-17 13:53:21] [ERROR:build.go:325] Couldn't attach to container
[2014-04-17 13:53:21] [ERROR:build.go:334] Error while waiting for artifact save in incremental build (2)
```

[1] https://github.com/kdar/factorlog