Initial windows support. Now we don't have the stacktrace and several unittests.
[platform/upstream/glog.git] / src / windows / glog / log_severity.h
1 // This file is automatically generated from src/glog/log_severity.h
2 // using src/windows/preprocess.sh.
3 // DO NOT EDIT!
4
5 // Copyright 2007 Google Inc. All Rights Reserved.
6
7 #ifndef BASE_LOG_SEVERITY_H__
8 #define BASE_LOG_SEVERITY_H__
9
10 // Annoying stuff for windows -- makes sure clients can import these functions
11 #ifndef GOOGLE_GLOG_DLL_DECL
12 # ifdef _WIN32
13 #   define GOOGLE_GLOG_DLL_DECL  __declspec(dllimport)
14 # else
15 #   define GOOGLE_GLOG_DLL_DECL
16 # endif
17 #endif
18
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;
23
24 const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4;
25
26 // DFATAL is FATAL in debug mode, ERROR in normal mode
27 #ifdef NDEBUG
28 #define DFATAL_LEVEL ERROR
29 #else
30 #define DFATAL_LEVEL FATAL
31 #endif
32
33 extern GOOGLE_GLOG_DLL_DECL const char* const LogSeverityNames[NUM_SEVERITIES];
34
35 // NDEBUG usage helpers related to (RAW_)DCHECK:
36 //
37 // DEBUG_MODE is for small !NDEBUG uses like
38 //   if (DEBUG_MODE) foo.CheckThatFoo();
39 // instead of substantially more verbose
40 //   #ifndef NDEBUG
41 //     foo.CheckThatFoo();
42 //   #endif
43 //
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
48 //   #ifndef NDEBUG
49 //     string error;
50 //     DCHECK(Foo(&error)) << error;
51 //   #endif
52 //
53 #ifdef NDEBUG
54 enum { DEBUG_MODE = 0 };
55 #define IF_DEBUG_MODE(x)
56 #else
57 enum { DEBUG_MODE = 1 };
58 #define IF_DEBUG_MODE(x) x
59 #endif
60
61 #endif  // BASE_LOG_SEVERITY_H__