]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/protocol/log.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/protocol/log.h
3 // Purpose: interface of wxProtocolLog
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
11 Class allowing to log network operations performed by wxProtocol.
22 Create object doing the logging using wxLogTrace() with the specified
25 If you override DoLogString() in your class the @a traceMask may be
26 left empty but it must have a valid value if you rely on the default
27 DoLogString() implementation.
29 wxProtocolLog(const wxString
& traceMask
);
32 Called by wxProtocol-derived objects to log strings sent to the server.
34 Default implementation prepends a client-to-server marker to @a str and
37 virtual void LogRequest(const wxString
& str
);
40 Called by wxProtocol-derived objects to log strings received from the
43 Default implementation prepends a server-to-client marker to @a str and
46 virtual void LogResponse(const wxString
& str
);
52 This function is called from LogRequest() and LogResponse() and by
53 default uses wxLogTrace() with the trace mask specified in the
54 constructor but can be overridden to do something different by the
57 virtual void DoLogString(const wxString
& str
);