Implement a thread-safe log writer (also called a 'system programming' or 'low-level coding' problem at Databricks). Multiple threads share a single logger instance and call a write() method concurrently. Core requirements: (1) all threads can write log entries simultaneously without data corruption; (2) each write() call must guarantee the data…