import time import os import sys log_file = "test_app.log" print(f"Logger starting. PID: {os.getpid()}") with open(log_file, "w") as f: i = 0 while True: # Write 10KB of data per iteration data = "X" * 10240 timestamp = time.strftime("%Y-%m-%d %H:%M:%S") f.write(f"{timestamp} - Log line {i} - {data}\n") f.flush() i += 1 time.sleep(0.01)