Support thread-safe logging