Convert WEBRTC_TRACE to LOG in utility.

BUG=3153
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/11099004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5886 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
asapersson@webrtc.org
2014-04-11 07:59:43 +00:00
parent b884eb6118
commit 8b2ec15d1e
6 changed files with 57 additions and 162 deletions

View File

@ -14,7 +14,7 @@
#include <stdio.h>
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/system_wrappers/interface/logging.h"
#if defined(_WIN32)
#include <Windows.h>
@ -71,7 +71,6 @@ RtpDumpImpl::RtpDumpImpl()
_file(*FileWrapper::Create()),
_startTime(0)
{
WEBRTC_TRACE(kTraceMemory, kTraceUtility, -1, "%s created", __FUNCTION__);
}
RtpDump::~RtpDump()
@ -84,7 +83,6 @@ RtpDumpImpl::~RtpDumpImpl()
_file.CloseFile();
delete &_file;
delete _critSect;
WEBRTC_TRACE(kTraceMemory, kTraceUtility, -1, "%s deleted", __FUNCTION__);
}
int32_t RtpDumpImpl::Start(const char* fileNameUTF8)
@ -100,8 +98,7 @@ int32_t RtpDumpImpl::Start(const char* fileNameUTF8)
_file.CloseFile();
if (_file.OpenFile(fileNameUTF8, false, false, false) == -1)
{
WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
"failed to open the specified file");
LOG(LS_ERROR) << "Failed to open file.";
return -1;
}
@ -113,8 +110,7 @@ int32_t RtpDumpImpl::Start(const char* fileNameUTF8)
sprintf(magic, "#!rtpplay%s \n", RTPFILE_VERSION);
if (_file.WriteText(magic) == -1)
{
WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
"error writing to file");
LOG(LS_ERROR) << "Error writing to file.";
return -1;
}
@ -129,8 +125,7 @@ int32_t RtpDumpImpl::Start(const char* fileNameUTF8)
memset(dummyHdr, 0, 16);
if (!_file.Write(dummyHdr, sizeof(dummyHdr)))
{
WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
"error writing to file");
LOG(LS_ERROR) << "Error writing to file.";
return -1;
}
return 0;
@ -198,14 +193,12 @@ int32_t RtpDumpImpl::DumpPacket(const uint8_t* packet, uint16_t packetLength)
if (!_file.Write(&hdr, sizeof(hdr)))
{
WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
"error writing to file");
LOG(LS_ERROR) << "Error writing to file.";
return -1;
}
if (!_file.Write(packet, packetLength))
{
WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
"error writing to file");
LOG(LS_ERROR) << "Error writing to file.";
return -1;
}