Adding a logger for shared pkg
First step towards unified logging in shared pkg

Also effectively eliminates some code quality issues.