forked from facebook/kuduraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging-inl.h
56 lines (52 loc) · 1.56 KB
/
logging-inl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2012 Google Inc.
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
// All rights reserved.
//
// Additional constants from logging.h and its dependencies which are
// not exported by glog.
#ifndef _LOGGING_IN_H_
#define _LOGGING_IN_H_
// DFATAL is FATAL in debug mode, ERROR in normal mode
#ifdef NDEBUG
#ifdef DFATAL_LEVEL
#undef DFATAL_LEVEL
#endif
#define DFATAL_LEVEL ERROR
#else
#ifdef DFATAL_LEVEL
#undef DFATAL_LEVEL
#endif
#define DFATAL_LEVEL FATAL
#endif
// NDEBUG usage helpers related to (RAW_)DCHECK:
//
// DEBUG_MODE is for small !NDEBUG uses like
// if (DEBUG_MODE) foo.CheckThatFoo();
// instead of substantially more verbose
// #ifndef NDEBUG
// foo.CheckThatFoo();
// #endif
//
#ifdef NDEBUG
const bool DEBUG_MODE = false;
#else
const bool DEBUG_MODE = true;
#endif
#endif // _LOGGING_IN_H_