Fix logging setup for tests