MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / WriteToLogError

Function WriteToLogError

source/main.cpp:701–724  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

699}
700//---------------------------------------------------------------------------
701bool WriteToLogError(String fmt, ...)
702{
703 TFile out(ErrorlogFile, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
704 OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL);
705 if( ! out )
706 return false;
707 out.ToEnd();
708
709 va_list argptr;
710 va_start(argptr, fmt);
711 String s;
712 s.vprintf(fmt.c_str(), argptr);
713
714 // Print in the status bar
715 if( s.Pos("ERROR\t") > 0 )
716 SB(2) = s.SubString(7, s.Length()-6);
717 else
718 SB(2) = s;
719
720 s = Now().DateTimeString() + '\t' + s + ::CR;
721 out << s;
722 va_end(argptr);
723 return true;
724}
725//---------------------------------------------------------------------------
726void __fastcall TMainForm::mOpenFilesLocExecute(TObject *Sender)
727{

Callers 15

GetNewRotationNameMethod · 0.85
RotateFileMethod · 0.85
RotationLogAddItemMethod · 0.85
UdpServerCreateFunction · 0.85
UdpServerStartFunction · 0.85
UdpReceiveMessageFunction · 0.85
TcpServerCreateFunction · 0.85
TcpServerStartFunction · 0.85
TcpAcceptFunction · 0.85
TcpReceiveMessageFunction · 0.85
ExecuteMethod · 0.85
AddToQueueMethod · 0.85

Calls 1

ToEndMethod · 0.80

Tested by

no test coverage detected