Remove debug spew.
Improve logging module a bit.

 * Disable buffering
 * Allow getting the underlying fd number.