Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :aggiunto il salvatore di vecchi log (log_christ ?)


git-svn-id: svn://10.65.10.50/trunk@19911 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2010-01-12 16:32:40 +00:00
parent 14ea969dc6
commit 83bea07f44

View File

@ -677,10 +677,24 @@ bool TBaseServerApp::OnInit()
// Create the Log file
wxString str;
//Prima di creare il nuovo log file (vuoto) salva quello vecchio aggiungendo al nome data e ora di ripartenza..
//..Serve per monitorare i defungimenti dei server
str = GetLogFileName();
if (!str.IsEmpty())
{
wxFileName fnLogFileName(str);
if (fnLogFileName.FileExists())
{
const wxDateTime dtNow = wxDateTime::Now();
wxString strWorkString;
strWorkString.Printf("%04d%02d%02d_%02d%02d_",
dtNow.GetYear(), dtNow.GetMonth() + 1, dtNow.GetDay(),
dtNow.GetHour(), dtNow.GetMinute());
strWorkString << fnLogFileName.GetName();
fnLogFileName.SetName(strWorkString);
wxCopyFile(str, fnLogFileName.GetFullPath());
}
m_log = new wxFileOutputStream(str);
m_bLogVerbose = GetConfigBool("LogVerbose");
}