A Novel GPT-Based Framework for Anomaly Detection in System Logs