MCPcopy Create free account
hub / github.com/android/ndk-samples / LogMessage

Class LogMessage

base/src/main/cpp/include/base/logging.h:414–436  ·  view source on GitHub ↗

A LogMessage is a temporarily scoped object used by LOG and the unlikely part of a CHECK. The destructor will abort if the severity is FATAL.

Source from the content-addressed store, hash-verified

412// A LogMessage is a temporarily scoped object used by LOG and the unlikely part
413// of a CHECK. The destructor will abort if the severity is FATAL.
414class LogMessage {
415 public:
416 // LogId has been deprecated, but this constructor must exist for prebuilts.
417 LogMessage(const char* file, unsigned int line, LogId, LogSeverity severity,
418 const char* tag, int error);
419 LogMessage(const char* file, unsigned int line, LogSeverity severity,
420 const char* tag, int error);
421
422 DISALLOW_COPY_AND_ASSIGN(LogMessage);
423
424 ~LogMessage();
425
426 // Returns the stream associated with the message, the LogMessage performs
427 // output when it goes out of scope.
428 std::ostream& stream();
429
430 // The routine that performs the actual logging.
431 static void LogLine(const char* file, unsigned int line, LogSeverity severity,
432 const char* tag, const char* msg);
433
434 private:
435 const std::unique_ptr<LogMessageData> data_;
436};
437
438// Get the minimum severity level for logging.
439LogSeverity GetMinimumLogSeverity();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected