1 // This file is automatically generated from src/glog/log_severity.h
2 // using src/windows/preprocess.sh.
5 // Copyright 2007 Google Inc. All Rights Reserved.
7 #ifndef BASE_LOG_SEVERITY_H__
8 #define BASE_LOG_SEVERITY_H__
10 // Annoying stuff for windows -- makes sure clients can import these functions
11 #ifndef GOOGLE_GLOG_DLL_DECL
13 # define GOOGLE_GLOG_DLL_DECL __declspec(dllimport)
15 # define GOOGLE_GLOG_DLL_DECL
19 // Variables of type LogSeverity are widely taken to lie in the range
20 // [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if
21 // you ever need to change their values or add a new severity.
22 typedef int LogSeverity;
24 const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4;
26 // DFATAL is FATAL in debug mode, ERROR in normal mode
28 #define DFATAL_LEVEL ERROR
30 #define DFATAL_LEVEL FATAL
33 extern GOOGLE_GLOG_DLL_DECL const char* const LogSeverityNames[NUM_SEVERITIES];
35 // NDEBUG usage helpers related to (RAW_)DCHECK:
37 // DEBUG_MODE is for small !NDEBUG uses like
38 // if (DEBUG_MODE) foo.CheckThatFoo();
39 // instead of substantially more verbose
41 // foo.CheckThatFoo();
44 // IF_DEBUG_MODE is for small !NDEBUG uses like
45 // IF_DEBUG_MODE( string error; )
46 // DCHECK(Foo(&error)) << error;
47 // instead of substantially more verbose
50 // DCHECK(Foo(&error)) << error;
54 enum { DEBUG_MODE = 0 };
55 #define IF_DEBUG_MODE(x)
57 enum { DEBUG_MODE = 1 };
58 #define IF_DEBUG_MODE(x) x
61 #endif // BASE_LOG_SEVERITY_H__