Move logging setup into max/log.py. The file handler is only used outside debug mode and its directory is configurable via LOG_DIR. FLASK_ENV is deprecated in Flask; debug mode is now controlled via FLASK_DEBUG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>