Add custom log handler