Improved logger handling.