Hook logger dynamically on app startup