Stores log information in SQL