Use log or warnings.warn instead of print
Merge pull request #1175 from nden/print-to-log

Use log or warnings.warn instead of print

Nothing interesting here, so merging it now. Closes #1065