十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
public static void WriteLog( string strLog )
{
string strDate = DateTime.Now.ToString( g_strDateFormate );
string strLogDir = AppDomain.CurrentDomain.BaseDirectory + "Log\\SysLog\\";
if ( !Directory.Exists( strLogDir ) )
Directory.CreateDirectory( strLogDir );
string strDateTime = DateTime.Now.ToString( g_strDateTimeFormate_2 );
strLog = string.Format( "[{0}] {1}\r\n", strDateTime, strLog );
string strLogFilePath = string.Format( "{0}/{1}.txt", strLogDir, strDate );
File.AppendAllText( strLogFilePath, strLog );
}