log

       public static void WriteLog(string filePath,string fileName,string msg)
        {
            try
            {
                string fullPath = filePath + "\" + fileName;
                using (System.IO.StreamWriter sw = new System.IO.StreamWriter(fullPath, false, Encoding.UTF8))
                {
                    sw.WriteLine(msg);
                }
            }
            catch (Exception ex)
            {
                throw;
            }

        }
原文地址:https://www.cnblogs.com/bg57/p/3424389.html