Changed logging functionality to allow custom log