Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
logging.h File Reference
#include <sstream>
#include "flutter/fml/log_level.h"
#include "flutter/fml/macros.h"

Go to the source code of this file.

Classes

struct  fml::testing::LogCapture
 
class  fml::LogMessageVoidify
 
class  fml::LogMessage
 

Namespaces

namespace  fml
 
namespace  fml::testing
 

Macros

#define FML_LOG_STREAM(severity)    ::fml::LogMessage(::fml::LOG_##severity, __FILE__, __LINE__, nullptr).stream()
 
#define FML_LAZY_STREAM(stream, condition)    !(condition) ? (void)0 : ::fml::LogMessageVoidify() & (stream)
 
#define FML_EAT_STREAM_PARAMETERS(ignored)
 
#define FML_LOG_IS_ON(severity)    (::fml::ShouldCreateLogMessage(::fml::LOG_##severity))
 
#define FML_LOG(severity)    FML_LAZY_STREAM(FML_LOG_STREAM(severity), FML_LOG_IS_ON(severity))
 
#define FML_CHECK(condition)
 
#define FML_VLOG_IS_ON(verbose_level)    ((verbose_level) <= ::fml::GetVlogVerbosity())
 
#define FML_VLOG_STREAM(verbose_level)    ::fml::LogMessage(-verbose_level, __FILE__, __LINE__, nullptr).stream()
 
#define FML_VLOG(verbose_level)    FML_LAZY_STREAM(FML_VLOG_STREAM(verbose_level), FML_VLOG_IS_ON(verbose_level))
 
#define FML_DLOG(severity)   FML_LOG(severity)
 
#define FML_DCHECK(condition)   FML_CHECK(condition)
 
#define FML_UNREACHABLE()
 

Functions

int fml::GetVlogVerbosity ()
 
bool fml::ShouldCreateLogMessage (LogSeverity severity)
 
void fml::KillProcess ()
 

Macro Definition Documentation

◆ FML_CHECK

#define FML_CHECK (   condition)
Value:
::fml::LogMessage(::fml::kLogFatal, __FILE__, __LINE__, #condition) \
.stream(), \
!(condition))
#define FML_LAZY_STREAM(stream, condition)
Definition: logging.h:70
constexpr LogSeverity kLogFatal
Definition: log_level.h:19

Definition at line 85 of file logging.h.

◆ FML_DCHECK

#define FML_DCHECK (   condition)    FML_CHECK(condition)

Definition at line 103 of file logging.h.

◆ FML_DLOG

#define FML_DLOG (   severity)    FML_LOG(severity)

Definition at line 102 of file logging.h.

◆ FML_EAT_STREAM_PARAMETERS

#define FML_EAT_STREAM_PARAMETERS (   ignored)
Value:
true || (ignored) \
? (void)0 \
::fml::LogMessage(::fml::kLogFatal, 0, 0, nullptr).stream()

Definition at line 73 of file logging.h.

◆ FML_LAZY_STREAM

#define FML_LAZY_STREAM (   stream,
  condition 
)     !(condition) ? (void)0 : ::fml::LogMessageVoidify() & (stream)

Definition at line 70 of file logging.h.

◆ FML_LOG

#define FML_LOG (   severity)     FML_LAZY_STREAM(FML_LOG_STREAM(severity), FML_LOG_IS_ON(severity))

Definition at line 82 of file logging.h.

◆ FML_LOG_IS_ON

#define FML_LOG_IS_ON (   severity)     (::fml::ShouldCreateLogMessage(::fml::LOG_##severity))

Definition at line 79 of file logging.h.

◆ FML_LOG_STREAM

#define FML_LOG_STREAM (   severity)     ::fml::LogMessage(::fml::LOG_##severity, __FILE__, __LINE__, nullptr).stream()

Definition at line 67 of file logging.h.

◆ FML_UNREACHABLE

#define FML_UNREACHABLE ( )
Value:
{ \
FML_LOG(ERROR) << "Reached unreachable code."; \
}
void KillProcess()
Definition: logging.cc:220
#define ERROR(message)
Definition: elf_loader.cc:260

Definition at line 109 of file logging.h.

◆ FML_VLOG

#define FML_VLOG (   verbose_level)     FML_LAZY_STREAM(FML_VLOG_STREAM(verbose_level), FML_VLOG_IS_ON(verbose_level))

Definition at line 98 of file logging.h.

◆ FML_VLOG_IS_ON

#define FML_VLOG_IS_ON (   verbose_level)     ((verbose_level) <= ::fml::GetVlogVerbosity())

Definition at line 91 of file logging.h.

◆ FML_VLOG_STREAM

#define FML_VLOG_STREAM (   verbose_level)     ::fml::LogMessage(-verbose_level, __FILE__, __LINE__, nullptr).stream()

Definition at line 95 of file logging.h.