logging support to replace print!

- there are still some concurrency issues that need to worked out