Log Differencing using State Machines for Anomaly Detection