Add logger programmatically