using System;
using MySqlConnector;

namespace Ticket_System
{
    public class Logger
    {
        public void Log(string message, string userID)
        {
            string sql = $"insert into Log  (LogID, ErrorMessage, datetime, User) values ((select max LogID from Log) + 1), {message}, {DateTime.Now},{userID})";

            MySqlCommand cmd = new MySqlCommand(sql);
            cmd.ExecuteNonQuery();

        }
    }
}

