Initial commit: Intelligent Disk Cleaner
This commit is contained in:
17
test_logger.py
Normal file
17
test_logger.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user