New logger class that is thread-safe