Move logging functionality from PHPFramework over