Log instead of printing

Set up Python logging early in the startup sequence (before the app is
created), and log instead of printing.  Fixes #19.