Do not print C++ line numbers for Java logging.

R=jiayl@webrtc.org

Review URL: https://codereview.webrtc.org/1342963002 .

Cr-Commit-Position: refs/heads/master@{#9945}
This commit is contained in:
Alex Glaznev
2015-09-15 11:05:24 -07:00
parent 0b05879cd7
commit ebed24dbfb
2 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,8 @@ LogMessage::LogMessage(const char* file, int line, LoggingSeverity sev,
print_stream_ << "[" << std::dec << id << "] "; print_stream_ << "[" << std::dec << id << "] ";
} }
print_stream_ << "(" << FilenameFromPath(file) << ":" << line << "): "; if (file != NULL)
print_stream_ << "(" << FilenameFromPath(file) << ":" << line << "): ";
if (err_ctx != ERRCTX_NONE) { if (err_ctx != ERRCTX_NONE) {
std::ostringstream tmp; std::ostringstream tmp;

View File

@ -354,7 +354,7 @@ inline bool LogCheckLevel(LoggingSeverity sev) {
#define LOG_TAG(sev, tag) \ #define LOG_TAG(sev, tag) \
LOG_SEVERITY_PRECONDITION(sev) \ LOG_SEVERITY_PRECONDITION(sev) \
rtc::LogMessage(__FILE__, __LINE__, sev, tag).stream() rtc::LogMessage(NULL, 0, sev, tag).stream()
#define PLOG(sev, err) \ #define PLOG(sev, err) \
LOG_ERR_EX(sev, err) LOG_ERR_EX(sev, err)