65 : m_OrigHandler(), m_Total()
116 static const char* auth_match =
"Authorization";
117 static const size_t auth_match_len = strlen( auth_match );
119 size_t match_ix = line.find( auth_match );
120 if( match_ix == string::npos )
return;
122 size_t eoln_ix = line.find_first_of(
"\r\n", match_ix );
123 if( eoln_ix == string::npos ){
124 eoln_ix = line.size();
127 match_ix += auth_match_len + 2;
128 if( eoln_ix > match_ix ){
129 line.replace( match_ix, eoln_ix - match_ix, eoln_ix - match_ix,
'*' );
148 logline.erase(
std::remove(logline.begin(), logline.end(),
'\r'), logline.end());
153 const char* saved_buffer = patched_msg->
m_Buffer;
154 size_t saved_buffer_len = patched_msg->
m_BufferLen;
156 patched_msg->
m_Buffer = logline.c_str();
161 patched_msg->
m_Buffer = saved_buffer;
174 if (!message.
source.empty()) {
176 size_t pos = message.
source.find(
"src");
177 if (pos!=string::npos) {
181 size_t pos = message.
source.find(
"include");
182 if (pos!=string::npos) {
199 const wxLogRecordInfo&
info)
208 message.
wxMsg =
true;
235 case wxLOG_FatalError:
CEvent - generic event implementation TODO TODO - Attachments.
void Release()
Manually force the resource to be released.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
static wxString ResolvePath(const wxString &path, const wxString &rel_name)
Utility function to hide the platform specifics of locating our standard directories and files.
an event for child notification
CwxLogDiagHandler - provides a centralized logging facility that integrates both with C++ Toolkit (CD...
bool GetMessage(size_t index, SMessage &msg, size_t &total) const
void GetMsgCount(size_t &total, size_t &buffered)
CEvent * x_AddMessage(const SMessage &msg)
virtual void Post(const SDiagMessage &msg)
post a message (CDiagHandler interface implementation)
void TweakContents(string &line)
CDiagHandler * m_OrigHandler
static CwxLogDiagHandler * GetInstance()
virtual void DoLogRecord(wxLogLevel level, const wxString &msg, const wxLogRecordInfo &info)
CNcbiOfstream m_LogStream
stream for logging all actions
static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
std::ofstream out("events_result.xml")
main entry point for tests
const char * m_File
File name.
const char * m_Buffer
Not guaranteed to be '\0'-terminated!
size_t m_Line
Line number in file.
EDiagSev m_Severity
Severity level.
virtual void Post(const SDiagMessage &mess)=0
Post message to handler.
CDiagHandler * GetDiagHandler(bool take_ownership=false, bool *current_ownership=0)
Get the currently set diagnostic handler class.
size_t m_BufferLen
Length of m_Buffer.
void SetDiagHandler(CDiagHandler *handler, bool can_delete=true)
Set the diagnostic handler using the specified diagnostic handler class.
CTime GetTime(void) const
Get time and date - current or parsed.
@ eDiag_Trace
Trace message.
@ eDiag_Info
Informational message.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
@ eDiag_Fatal
Fatal error – guarantees exit(or abort)
virtual const TListeners * GetListeners(int pool_name=ePool_Default) const
returns a set of listeners fro the specified pool
void Post(CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Handles an event asynchronously (process and/or dispatch).
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
CTime & ToLocalTime(void)
Convert the time into local time.
string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const
Transform time to string.
DEFINE_STATIC_MUTEX(s_LogGbenchMutex)
static CwxLogDiagHandler * s_Instance
static void text(MDB_val *v)