Write text file C# (edit)

Usage

MyLogger.WriteLine("\r\nSET DATEFORMAT DMY;\r\n" + sQuery);

Code base

public static class MyLogger
{
    private static string M_LogFilePath = "";

    static MyLogger()
    {
        M_LogFilePath = Path.Combine(Application.StartupPath, "SQL.log");

        if (!File.Exists(M_LogFilePath))
        {
            using (StreamWriter writer = new StreamWriter(M_LogFilePath, true))
            {
                writer.WriteLine($"Start Debug at: {DateTime.Now.ToString("yyyy-MM-dd HH:mm tt")}");
            }
        }
    }

    public static void AppendLine(string line)
    {
        using (StreamWriter streamWriter = File.AppendText(M_LogFilePath))
        {
            streamWriter.WriteLine(line);
        }
    }

    public static void WriteLine(string line)
    {
        using (StreamWriter streamWriter = new StreamWriter(M_LogFilePath, true))
        {
            streamWriter.WriteLine(line);
        }
    }
}