X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/730b772b41ad9df76e5226290bb9eb917ea161f0..dbe0872fc80f7fc9ac37235ab1f8ba8224b0bfa5:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index add0e8392a..235a29d3db 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -245,7 +245,6 @@ char wxFTP::SendCommand(const wxString& command) return 0; } -#ifdef __WXDEBUG__ // don't show the passwords in the logs (even in debug ones) wxString cmd, password; if ( command.Upper().StartsWith(_T("PASS "), &password) ) @@ -257,8 +256,7 @@ char wxFTP::SendCommand(const wxString& command) cmd = command; } - wxLogTrace(FTP_TRACE_MASK, _T("==> %s"), cmd.c_str()); -#endif // __WXDEBUG__ + LogRequest(cmd); m_lastError = wxPROTO_NOERR; return GetResult(); @@ -301,6 +299,8 @@ char wxFTP::GetResult() return 0; } + LogResponse(line); + if ( !m_lastResult.empty() ) { // separate from last line @@ -317,11 +317,6 @@ char wxFTP::GetResult() { badReply = true; } - else - { - wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"), - code.c_str(), line.c_str()); - } } else // line has at least 4 chars { @@ -331,8 +326,6 @@ char wxFTP::GetResult() if ( firstLine ) { code = wxString(line, LEN_CODE); - wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"), - code.c_str(), line.c_str() + LEN_CODE + 1); switch ( chMarker ) { @@ -357,15 +350,6 @@ char wxFTP::GetResult() { endOfReply = true; } - - wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"), - code.c_str(), line.c_str() + LEN_CODE + 1); - } - else - { - // just part of reply - wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"), - code.c_str(), line.c_str()); } } } @@ -728,7 +712,7 @@ public: wxFTP *m_ftp; - DECLARE_NO_COPY_CLASS(wxInputFTPStream) + wxDECLARE_NO_COPY_CLASS(wxInputFTPStream); }; class wxOutputFTPStream : public wxSocketOutputStream @@ -764,7 +748,7 @@ public: wxFTP *m_ftp; - DECLARE_NO_COPY_CLASS(wxOutputFTPStream) + wxDECLARE_NO_COPY_CLASS(wxOutputFTPStream); }; wxInputStream *wxFTP::GetInputStream(const wxString& path) @@ -1008,8 +992,7 @@ int wxFTP::GetFileSize(const wxString& fileName) &filesize) != 9 ) { // Hmm... Invalid response - wxLogTrace(FTP_TRACE_MASK, - _T("Invalid LIST response")); + wxLogDebug(wxT("Invalid LIST response")); } } else // Windows-style response (?) @@ -1019,8 +1002,7 @@ int wxFTP::GetFileSize(const wxString& fileName) &filesize) != 4 ) { // something bad happened..? - wxLogTrace(FTP_TRACE_MASK, - _T("Invalid or unknown LIST response")); + wxLogDebug(wxT("Invalid or unknown LIST response")); } } }