1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_LOG_SEVERITY_H_
6 #define BASE_LOG_SEVERITY_H_
9 #include "base/commandlineflags.h"
11 // Variables of type LogSeverity are widely taken to lie in the range
12 // [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if
13 // you ever need to change their values or add a new severity.
14 typedef int LogSeverity
;
16 const int INFO
= 0, WARNING
= 1, ERROR
= 2, FATAL
= 3, NUM_SEVERITIES
= 4;
18 // DFATAL is FATAL in debug mode, ERROR in normal mode
20 #define DFATAL_LEVEL ERROR
22 #define DFATAL_LEVEL FATAL
25 extern const char* const LogSeverityNames
[NUM_SEVERITIES
];
27 // Some flags needed for VLOG and RAW_VLOG
29 DECLARE_bool(silent_init
);
31 // NDEBUG usage helpers related to (RAW_)DCHECK:
33 // DEBUG_MODE is for small !NDEBUG uses like
34 // if (DEBUG_MODE) foo.CheckThatFoo();
35 // instead of substantially more verbose
37 // foo.CheckThatFoo();
41 enum { DEBUG_MODE
= 0 };
43 enum { DEBUG_MODE
= 1 };
46 #endif // BASE_LOG_SEVERITY_H_