diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index 812fc92af..0281f6de5 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -1741,7 +1741,7 @@ class GLOG_EXPORT Logger { // Get the current LOG file size. // The returned value is approximate since some // logged data may not have been flushed to disk yet. - virtual uint32 LogSize() = 0; + virtual std::size_t LogSize() = 0; }; // Get the logger for the specified severity level. The logger diff --git a/src/logging.cc b/src/logging.cc index fa8868561..b39217ae8 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -453,7 +453,7 @@ class LogFileObject : public base::Logger { // It is the actual file length for the system loggers, // i.e., INFO, ERROR, etc. - uint32 LogSize() override { + std::size_t LogSize() override { MutexLock l(&lock_); return file_length_; } @@ -475,7 +475,7 @@ class LogFileObject : public base::Logger { LogSeverity severity_; uint32 bytes_since_flush_{0}; uint32 dropped_mem_length_{0}; - uint32 file_length_{0}; + std::size_t file_length_{0}; unsigned int rollover_attempt_; int64 next_flush_time_{0}; // cycle count at which to flush log WallTime start_time_; diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc index fff766070..b452c6637 100644 --- a/src/logging_unittest.cc +++ b/src/logging_unittest.cc @@ -894,7 +894,7 @@ struct MyLogger : public base::Logger { void Flush() override {} - uint32 LogSize() override { return data.length(); } + std::size_t LogSize() override { return data.length(); } private: bool* set_on_destruction_; @@ -1027,7 +1027,7 @@ struct RecordDeletionLogger : public base::Logger { wrapped_logger_->Write(force_flush, timestamp, message, length); } void Flush() override { wrapped_logger_->Flush(); } - uint32 LogSize() override { return wrapped_logger_->LogSize(); } + std::size_t LogSize() override { return wrapped_logger_->LogSize(); } private: bool* set_on_destruction_;