Using system;
Using system. Collections. Generic;
Using system. text;
Using system. IO;
Namespace myquery. utils
{
/// <Summary>
/// Log Encapsulation
/// By Jia Shiyi 2011-07-01
/// </Summary>
Public static class loghelper
{
/// <Summary>
/// Write logs
/// </Summary>
/// <Param name = "filepre"> file name prefix </param>
/// <Param name = "message"> </param>
Public static void writetofile (string filepre, string message)
{
String Path = webhelper. getrootserverpath () + "log ";
If (! Directory. exists (PATH ))
{
Directory. createdirectory (PATH );
}
If (string. isnullorempty (filepre ))
{
Filepre = "log ";
}
Path + = "\" + filepre + system. datetime. Today. tostring ("yyyymmdd") + ". txt ";
Txthelper. writetofile (path, message, false );
}
}
}
Welcome to: http: // 121.18.78.216, which is a demonstration platform for ease of query and analysis, workflow, content management, and project management.