forked from rte-france/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log_severity.h
44 lines (37 loc) · 1.53 KB
/
log_severity.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
// Copyright 2010-2022 Google LLC
// Licensed 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.
#ifndef OR_TOOLS_BASE_LOG_SEVERITY_H_
#define OR_TOOLS_BASE_LOG_SEVERITY_H_
#include "ortools/base/logging_export.h"
// Variables of type LogSeverity are widely taken to lie in the range
// [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if
// you ever need to change their values or add a new severity.
typedef int LogSeverity;
namespace google {
const int GLOG_INFO = 0, GLOG_WARNING = 1, GLOG_ERROR = 2, GLOG_FATAL = 3,
NUM_SEVERITIES = 4;
extern GOOGLE_GLOG_DLL_DECL const char* const LogSeverityNames[NUM_SEVERITIES];
} // namespace google
#ifndef _MSC_VER
constexpr LogSeverity INFO = google::GLOG_INFO;
constexpr LogSeverity WARNING = google::GLOG_WARNING;
constexpr LogSeverity ERROR = google::GLOG_ERROR;
constexpr LogSeverity FATAL = google::GLOG_FATAL;
#endif
// DFATAL is FATAL in debug mode, ERROR in normal mode
#ifdef NDEBUG
#define DFATAL_LEVEL ERROR
#else
#define DFATAL_LEVEL FATAL
#endif
#endif // OR_TOOLS_BASE_LOG_SEVERITY_H_