OR-Tools  8.1
google Namespace Reference

Namespaces

 base
 
 base_logging
 
 logging_internal
 
 protobuf
 

Classes

struct  CheckOpString
 
struct  DummyClassToDefineOperator
 
class  ErrnoLogMessage
 
class  LogDestination
 
class  LogMessage
 
class  LogMessageFatal
 
class  LogMessageVoidify
 
class  LogSink
 
class  NullStream
 
class  NullStreamFatal
 
struct  VModuleInfo
 

Typedefs

typedef void(* logging_fail_func_t) () ATTRIBUTE_NORETURN
 
typedef void DebugWriter(const char *, void *)
 

Enumerations

enum  GLogColor { COLOR_DEFAULT, COLOR_RED, COLOR_GREEN, COLOR_YELLOW }
 
enum  PRIVATE_Counter { COUNTER }
 

Functions

static GLogColor SeverityToColor (LogSeverity severity)
 
static const char * GetAnsiColorCode (GLogColor color)
 
static int32 MaxLogSize ()
 
const char * GetLogSeverityName (LogSeverity severity)
 
static void ColoredWriteToStderr (LogSeverity severity, const char *message, size_t len)
 
static void WriteToStderr (const char *message, size_t len)
 
void ReprintFatalMessage ()
 
static void logging_fail () ATTRIBUTE_NORETURN
 
void InstallFailureFunction (void(*fail_func)())
 
ostream & operator<< (ostream &os, const PRIVATE_Counter &)
 
void FlushLogFiles (LogSeverity min_severity)
 
void FlushLogFilesUnsafe (LogSeverity min_severity)
 
void SetLogDestination (LogSeverity severity, const char *base_filename)
 
void SetLogSymlink (LogSeverity severity, const char *symlink_basename)
 
void AddLogSink (LogSink *destination)
 
void RemoveLogSink (LogSink *destination)
 
void SetLogFilenameExtension (const char *ext)
 
void SetStderrLogging (LogSeverity min_severity)
 
void LogToStderr ()
 
static string ShellEscape (const string &src)
 
static void GetTempDirectories (vector< string > *list)
 
const vector< string > & GetLoggingDirectories ()
 
void TestOnly_ClearLoggingDirectoriesList ()
 
void GetExistingTempDirectories (vector< string > *list)
 
int posix_strerror_r (int err, char *buf, size_t len)
 
string StrError (int err)
 
template<>
void MakeCheckOpValueString (std::ostream *os, const char &v)
 
template<>
void MakeCheckOpValueString (std::ostream *os, const signed char &v)
 
template<>
void MakeCheckOpValueString (std::ostream *os, const unsigned char &v)
 
void InitGoogleLogging (const char *argv0)
 
void ShutdownGoogleLogging ()
 
template<class T >
const T & GetReferenceableValue (const T &t)
 
char GetReferenceableValue (char t)
 
unsigned char GetReferenceableValue (unsigned char t)
 
signed char GetReferenceableValue (signed char t)
 
int16 GetReferenceableValue (int16 t)
 
uint16 GetReferenceableValue (uint16 t)
 
int GetReferenceableValue (int t)
 
unsigned int GetReferenceableValue (unsigned int t)
 
int64 GetReferenceableValue (int64 t)
 
uint64 GetReferenceableValue (uint64 t)
 
template<typename T >
void MakeCheckOpValueString (std::ostream *os, const T &v)
 
template<typename T1 , typename T2 >
std::string * MakeCheckOpString (const T1 &v1, const T2 &v2, const char *exprtext) ATTRIBUTE_NOINLINE
 
 DEFINE_CHECK_OP_IMPL (Check_EQ,==) DEFINE_CHECK_OP_IMPL(Check_NE
 
void LogAtLevel (int const severity, std::string const &msg)
 
template<typename T >
T * CheckNotNull (const char *file, int line, const char *names, T *t)
 
template<class T >
NullStreamoperator<< (NullStream &str, const T &)
 
static void DebugWriteToStderr (const char *data, void *)
 
static void DebugWriteToString (const char *data, void *arg)
 
static void DumpPCAndSymbol (DebugWriter *writerfn, void *arg, void *pc, const char *const prefix)
 
static void DumpPC (DebugWriter *writerfn, void *arg, void *pc, const char *const prefix)
 
static void DumpStackTrace (int skip_count, DebugWriter *writerfn, void *arg)
 
static void DumpStackTraceAndExit ()
 
static bool DoRawLog (char **buf, int *size, const char *format,...)
 
static bool VADoRawLog (char **buf, int *size, const char *format, va_list ap)
 
void RawLog__ (LogSeverity severity, const char *file, int line, const char *format,...)
 
static void RawLogStub__ (int,...)
 
template<class Iter >
void PrintSequence (std::ostream &out, Iter begin, Iter end)
 
static void VLOG2Initializer ()
 
int SetVLOGLevel (const char *module_pattern, int log_level)
 
bool InitVLOG3__ (int32 **site_flag, int32 *site_default, const char *fname, int32 verbose_level)
 

Variables

const int GLOG_INFO = 0
 
const int GLOG_WARNING = 1
 
const int GLOG_ERROR = 2
 
const int GLOG_FATAL = 3
 
const int NUM_SEVERITIES = 4
 
GOOGLE_GLOG_DLL_DECL const char *const LogSeverityNames [NUM_SEVERITIES]
 
static absl::Mutex log_mutex
 
static bool stop_writing = false
 
static bool exit_on_dfatal = true
 
static absl::Mutex fatal_msg_lock
 
static logging_internal::CrashReason crash_reason
 
static bool fatal_msg_exclusive = true
 
static LogMessage::LogMessageData fatal_msg_data_exclusive
 
static LogMessage::LogMessageData fatal_msg_data_shared
 
static thread_local bool thread_data_available = true
 
static thread_local std::aligned_storage< sizeof(LogMessage::LogMessageData), alignof(LogMessage::LogMessageData)>::type thread_msg_data
 
static time_t fatal_time
 
static char fatal_message [256]
 
GOOGLE_GLOG_DLL_DECL logging_fail_func_t g_logging_fail_func = &logging_fail
 
static const char kDontNeedShellEscapeChars []
 
static vector< string > * logging_directories_list
 
static const char * g_program_invocation_short_name = NULL
 
static pthread_t g_main_thread_id
 
static const int kPrintfPointerFieldWidth = 2 + 2 * sizeof(void*)
 
static const int kLogBufSize = 3000
 
static bool crashed = false
 
static logging_internal::CrashReason crash_reason
 
static char crash_buf [kLogBufSize+1] = {0}
 
int32 kLogSiteUninitialized = 1000
 
static absl::Mutex vmodule_lock
 
static VModuleInfovmodule_list = 0
 
static bool inited_vmodule = false
 

Typedef Documentation

◆ DebugWriter

typedef void DebugWriter(const char *, void *)

Definition at line 152 of file logging_utilities.cc.

◆ logging_fail_func_t

typedef void(* logging_fail_func_t) () ATTRIBUTE_NORETURN

Definition at line 1383 of file base/logging.cc.

Enumeration Type Documentation

◆ GLogColor

enum GLogColor
Enumerator
COLOR_DEFAULT 
COLOR_RED 
COLOR_GREEN 
COLOR_YELLOW 

Definition at line 246 of file base/logging.cc.

◆ PRIVATE_Counter

Enumerator
COUNTER 

Definition at line 857 of file base/logging.h.

Function Documentation

◆ AddLogSink()

GOOGLE_GLOG_DLL_DECL void AddLogSink ( LogSink destination)

Definition at line 1550 of file base/logging.cc.

◆ CheckNotNull()

T* google::CheckNotNull ( const char *  file,
int  line,
const char *  names,
T *  t 
)

Definition at line 1218 of file base/logging.h.

◆ ColoredWriteToStderr()

static void google::ColoredWriteToStderr ( LogSeverity  severity,
const char *  message,
size_t  len 
)
static

Definition at line 622 of file base/logging.cc.

◆ DebugWriteToStderr()

static void google::DebugWriteToStderr ( const char *  data,
void *   
)
static

Definition at line 158 of file logging_utilities.cc.

◆ DebugWriteToString()

static void google::DebugWriteToString ( const char *  data,
void *  arg 
)
static

Definition at line 165 of file logging_utilities.cc.

◆ DEFINE_CHECK_OP_IMPL()

google::DEFINE_CHECK_OP_IMPL ( Check_EQ  )

◆ DoRawLog()

static bool google::DoRawLog ( char **  buf,
int *  size,
const char *  format,
  ... 
)
static

Definition at line 51 of file raw_logging.cc.

◆ DumpPC()

static void google::DumpPC ( DebugWriter writerfn,
void *  arg,
void *  pc,
const char *const  prefix 
)
static

Definition at line 186 of file logging_utilities.cc.

◆ DumpPCAndSymbol()

static void google::DumpPCAndSymbol ( DebugWriter writerfn,
void *  arg,
void *  pc,
const char *const  prefix 
)
static

Definition at line 170 of file logging_utilities.cc.

◆ DumpStackTrace()

static void google::DumpStackTrace ( int  skip_count,
DebugWriter writerfn,
void *  arg 
)
static

Definition at line 194 of file logging_utilities.cc.

◆ DumpStackTraceAndExit()

static void google::DumpStackTraceAndExit ( )
static

Definition at line 207 of file logging_utilities.cc.

◆ FlushLogFiles()

GOOGLE_GLOG_DLL_DECL void FlushLogFiles ( LogSeverity  min_severity)

Definition at line 1505 of file base/logging.cc.

◆ FlushLogFilesUnsafe()

GOOGLE_GLOG_DLL_DECL void FlushLogFilesUnsafe ( LogSeverity  min_severity)

Definition at line 1509 of file base/logging.cc.

◆ GetAnsiColorCode()

static const char* google::GetAnsiColorCode ( GLogColor  color)
static

Definition at line 288 of file base/logging.cc.

◆ GetExistingTempDirectories()

GOOGLE_GLOG_DLL_DECL void GetExistingTempDirectories ( vector< string > *  list)

Definition at line 1713 of file base/logging.cc.

◆ GetLoggingDirectories()

GOOGLE_GLOG_DLL_DECL const std::vector< std::string > & GetLoggingDirectories ( )

Definition at line 1682 of file base/logging.cc.

◆ GetLogSeverityName()

GOOGLE_GLOG_DLL_DECL const char * GetLogSeverityName ( LogSeverity  severity)

Definition at line 364 of file base/logging.cc.

◆ GetReferenceableValue() [1/10]

char google::GetReferenceableValue ( char  t)
inline

Definition at line 518 of file base/logging.h.

◆ GetReferenceableValue() [2/10]

const T& google::GetReferenceableValue ( const T &  t)
inline

Definition at line 515 of file base/logging.h.

◆ GetReferenceableValue() [3/10]

int google::GetReferenceableValue ( int  t)
inline

Definition at line 523 of file base/logging.h.

◆ GetReferenceableValue() [4/10]

int16 google::GetReferenceableValue ( int16  t)
inline

Definition at line 521 of file base/logging.h.

◆ GetReferenceableValue() [5/10]

int64 google::GetReferenceableValue ( int64  t)
inline

Definition at line 525 of file base/logging.h.

◆ GetReferenceableValue() [6/10]

signed char google::GetReferenceableValue ( signed char  t)
inline

Definition at line 520 of file base/logging.h.

◆ GetReferenceableValue() [7/10]

uint16 google::GetReferenceableValue ( uint16  t)
inline

Definition at line 522 of file base/logging.h.

◆ GetReferenceableValue() [8/10]

uint64 google::GetReferenceableValue ( uint64  t)
inline

Definition at line 526 of file base/logging.h.

◆ GetReferenceableValue() [9/10]

unsigned char google::GetReferenceableValue ( unsigned char  t)
inline

Definition at line 519 of file base/logging.h.

◆ GetReferenceableValue() [10/10]

unsigned int google::GetReferenceableValue ( unsigned int  t)
inline

Definition at line 524 of file base/logging.h.

◆ GetTempDirectories()

static void google::GetTempDirectories ( vector< string > *  list)
static

Definition at line 1631 of file base/logging.cc.

◆ InitGoogleLogging()

GOOGLE_GLOG_DLL_DECL void InitGoogleLogging ( const char *  argv0)
Examples
nurses_cp.cc.

Definition at line 1867 of file base/logging.cc.

◆ InitVLOG3__()

GOOGLE_GLOG_DLL_DECL bool InitVLOG3__ ( int32 **  site_flag,
int32 site_default,
const char *  fname,
int32  verbose_level 
)

Definition at line 186 of file vlog_is_on.cc.

◆ InstallFailureFunction()

GOOGLE_GLOG_DLL_DECL void InstallFailureFunction ( void(*)()  fail_func)

Definition at line 1388 of file base/logging.cc.

◆ LogAtLevel()

void google::LogAtLevel ( int const  severity,
std::string const &  msg 
)
inline

Definition at line 1176 of file base/logging.h.

◆ logging_fail()

static void logging_fail ( )
static

Definition at line 1381 of file base/logging.cc.

◆ LogToStderr()

GOOGLE_GLOG_DLL_DECL void LogToStderr ( )

Definition at line 1566 of file base/logging.cc.

◆ MakeCheckOpString()

std::string * MakeCheckOpString ( const T1 &  v1,
const T2 &  v2,
const char *  exprtext 
)

Definition at line 602 of file base/logging.h.

◆ MakeCheckOpValueString() [1/4]

GOOGLE_GLOG_DLL_DECL void MakeCheckOpValueString ( std::ostream *  os,
const char &  v 
)

Definition at line 1841 of file base/logging.cc.

◆ MakeCheckOpValueString() [2/4]

GOOGLE_GLOG_DLL_DECL void MakeCheckOpValueString ( std::ostream *  os,
const signed char &  v 
)

Definition at line 1850 of file base/logging.cc.

◆ MakeCheckOpValueString() [3/4]

void google::MakeCheckOpValueString ( std::ostream *  os,
const T &  v 
)
inline

Definition at line 545 of file base/logging.h.

◆ MakeCheckOpValueString() [4/4]

GOOGLE_GLOG_DLL_DECL void MakeCheckOpValueString ( std::ostream *  os,
const unsigned char &  v 
)

Definition at line 1859 of file base/logging.cc.

◆ MaxLogSize()

static int32 google::MaxLogSize ( )
static

Definition at line 305 of file base/logging.cc.

◆ operator<<() [1/2]

NullStream& google::operator<< ( NullStream str,
const T &   
)
inline

Definition at line 1463 of file base/logging.h.

◆ operator<<() [2/2]

GOOGLE_GLOG_DLL_DECL std::ostream & operator<< ( ostream &  os,
const PRIVATE_Counter  
)

Definition at line 1481 of file base/logging.cc.

◆ posix_strerror_r()

GOOGLE_GLOG_DLL_DECL int posix_strerror_r ( int  err,
char *  buf,
size_t  len 
)

Definition at line 1748 of file base/logging.cc.

◆ PrintSequence()

void PrintSequence ( std::ostream &  out,
Iter  begin,
Iter  end 
)
inline

Definition at line 108 of file stl_logging.h.

◆ RawLog__()

GOOGLE_GLOG_DLL_DECL void RawLog__ ( LogSeverity  severity,
const char *  file,
int  line,
const char *  format,
  ... 
)

Definition at line 77 of file raw_logging.cc.

◆ RawLogStub__()

static void google::RawLogStub__ ( int  ,
  ... 
)
inlinestatic

Definition at line 130 of file raw_logging.h.

◆ RemoveLogSink()

GOOGLE_GLOG_DLL_DECL void RemoveLogSink ( LogSink destination)

Definition at line 1554 of file base/logging.cc.

◆ ReprintFatalMessage()

GOOGLE_GLOG_DLL_DECL void ReprintFatalMessage ( )

Definition at line 1259 of file base/logging.cc.

◆ SetLogDestination()

GOOGLE_GLOG_DLL_DECL void SetLogDestination ( LogSeverity  severity,
const char *  base_filename 
)

Definition at line 1513 of file base/logging.cc.

◆ SetLogFilenameExtension()

GOOGLE_GLOG_DLL_DECL void SetLogFilenameExtension ( const char *  ext)

Definition at line 1558 of file base/logging.cc.

◆ SetLogSymlink()

GOOGLE_GLOG_DLL_DECL void SetLogSymlink ( LogSeverity  severity,
const char *  symlink_basename 
)

Definition at line 1517 of file base/logging.cc.

◆ SetStderrLogging()

GOOGLE_GLOG_DLL_DECL void SetStderrLogging ( LogSeverity  min_severity)

Definition at line 1562 of file base/logging.cc.

◆ SetVLOGLevel()

GOOGLE_GLOG_DLL_DECL int SetVLOGLevel ( const char *  module_pattern,
int  log_level 
)

Definition at line 151 of file vlog_is_on.cc.

◆ SeverityToColor()

static GLogColor google::SeverityToColor ( LogSeverity  severity)
static

Definition at line 248 of file base/logging.cc.

◆ ShellEscape()

static string google::ShellEscape ( const string &  src)
static

Definition at line 1602 of file base/logging.cc.

◆ ShutdownGoogleLogging()

GOOGLE_GLOG_DLL_DECL void ShutdownGoogleLogging ( )

Definition at line 1871 of file base/logging.cc.

◆ StrError()

GOOGLE_GLOG_DLL_DECL std::string StrError ( int  err)

Definition at line 1798 of file base/logging.cc.

◆ TestOnly_ClearLoggingDirectoriesList()

void TestOnly_ClearLoggingDirectoriesList ( )

Definition at line 1705 of file base/logging.cc.

◆ VADoRawLog()

static bool google::VADoRawLog ( char **  buf,
int *  size,
const char *  format,
va_list  ap 
)
inlinestatic

Definition at line 63 of file raw_logging.cc.

◆ VLOG2Initializer()

static void google::VLOG2Initializer ( )
static

Definition at line 116 of file vlog_is_on.cc.

◆ WriteToStderr()

static void google::WriteToStderr ( const char *  message,
size_t  len 
)
static

Definition at line 660 of file base/logging.cc.

Variable Documentation

◆ crash_buf

char crash_buf[kLogBufSize+1] = {0}
static

Definition at line 75 of file raw_logging.cc.

◆ crash_reason [1/2]

logging_internal::CrashReason crash_reason
static

Definition at line 1048 of file base/logging.cc.

◆ crash_reason [2/2]

logging_internal::CrashReason crash_reason
static

Definition at line 74 of file raw_logging.cc.

◆ crashed

bool crashed = false
static

Definition at line 73 of file raw_logging.cc.

◆ exit_on_dfatal

bool exit_on_dfatal = true
static

Definition at line 362 of file base/logging.cc.

◆ fatal_message

char fatal_message[256]
static

Definition at line 1257 of file base/logging.cc.

◆ fatal_msg_data_exclusive

LogMessage::LogMessageData fatal_msg_data_exclusive
static

Definition at line 1050 of file base/logging.cc.

◆ fatal_msg_data_shared

LogMessage::LogMessageData fatal_msg_data_shared
static

Definition at line 1051 of file base/logging.cc.

◆ fatal_msg_exclusive

bool fatal_msg_exclusive = true
static

Definition at line 1049 of file base/logging.cc.

◆ fatal_msg_lock

absl::Mutex fatal_msg_lock
static

Definition at line 1047 of file base/logging.cc.

◆ fatal_time

time_t fatal_time
static

Definition at line 1256 of file base/logging.cc.

◆ g_logging_fail_func

Definition at line 1386 of file base/logging.cc.

◆ g_main_thread_id

pthread_t g_main_thread_id
static

Definition at line 136 of file logging_utilities.cc.

◆ g_program_invocation_short_name

const char* g_program_invocation_short_name = NULL
static

Definition at line 135 of file logging_utilities.cc.

◆ GLOG_ERROR

const int GLOG_ERROR = 2

Definition at line 25 of file log_severity.h.

◆ GLOG_FATAL

const int GLOG_FATAL = 3

Definition at line 25 of file log_severity.h.

◆ GLOG_INFO

const int GLOG_INFO = 0

Definition at line 25 of file log_severity.h.

◆ GLOG_WARNING

const int GLOG_WARNING = 1

Definition at line 25 of file log_severity.h.

◆ inited_vmodule

bool inited_vmodule = false
static

Definition at line 113 of file vlog_is_on.cc.

◆ kDontNeedShellEscapeChars

const char kDontNeedShellEscapeChars[]
static
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+-_.=/:,@"

Definition at line 1597 of file base/logging.cc.

◆ kLogBufSize

const int kLogBufSize = 3000
static

Definition at line 72 of file raw_logging.cc.

◆ kLogSiteUninitialized

int32 kLogSiteUninitialized = 1000

Definition at line 90 of file vlog_is_on.cc.

◆ kPrintfPointerFieldWidth

const int kPrintfPointerFieldWidth = 2 + 2 * sizeof(void*)
static

Definition at line 156 of file logging_utilities.cc.

◆ log_mutex

absl::Mutex log_mutex
static

Definition at line 350 of file base/logging.cc.

◆ logging_directories_list

vector<string>* logging_directories_list
static

Definition at line 1680 of file base/logging.cc.

◆ LogSeverityNames

const char *const LogSeverityNames
Initial value:
= {"INFO", "WARNING",
"ERROR", "FATAL"}

Definition at line 358 of file base/logging.cc.

◆ NUM_SEVERITIES

const int NUM_SEVERITIES = 4

Definition at line 26 of file log_severity.h.

◆ stop_writing

bool stop_writing = false
static

Definition at line 356 of file base/logging.cc.

◆ thread_data_available

thread_local bool thread_data_available = true
static

Definition at line 1056 of file base/logging.cc.

◆ thread_msg_data

thread_local std::aligned_storage< sizeof(LogMessage::LogMessageData), alignof(LogMessage::LogMessageData)>::type thread_msg_data
static

Definition at line 1060 of file base/logging.cc.

◆ vmodule_list

VModuleInfo* vmodule_list = 0
static

Definition at line 111 of file vlog_is_on.cc.

◆ vmodule_lock

absl::Mutex vmodule_lock
static

Definition at line 108 of file vlog_is_on.cc.