How to get logs programmatically, without using the UI, let's say send them to your server in text or other form.