xref: /aosp_15_r20/external/zstd/lib/common/debug.c (revision 01826a4963a0d8a59bc3812d29bdf0fb76416722)
1*01826a49SYabin Cui /* ******************************************************************
2*01826a49SYabin Cui  * debug
3*01826a49SYabin Cui  * Part of FSE library
4*01826a49SYabin Cui  * Copyright (c) Meta Platforms, Inc. and affiliates.
5*01826a49SYabin Cui  *
6*01826a49SYabin Cui  * You can contact the author at :
7*01826a49SYabin Cui  * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
8*01826a49SYabin Cui  *
9*01826a49SYabin Cui  * This source code is licensed under both the BSD-style license (found in the
10*01826a49SYabin Cui  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
11*01826a49SYabin Cui  * in the COPYING file in the root directory of this source tree).
12*01826a49SYabin Cui  * You may select, at your option, one of the above-listed licenses.
13*01826a49SYabin Cui ****************************************************************** */
14*01826a49SYabin Cui 
15*01826a49SYabin Cui 
16*01826a49SYabin Cui /*
17*01826a49SYabin Cui  * This module only hosts one global variable
18*01826a49SYabin Cui  * which can be used to dynamically influence the verbosity of traces,
19*01826a49SYabin Cui  * such as DEBUGLOG and RAWLOG
20*01826a49SYabin Cui  */
21*01826a49SYabin Cui 
22*01826a49SYabin Cui #include "debug.h"
23*01826a49SYabin Cui 
24*01826a49SYabin Cui #if !defined(ZSTD_LINUX_KERNEL) || (DEBUGLEVEL>=2)
25*01826a49SYabin Cui /* We only use this when DEBUGLEVEL>=2, but we get -Werror=pedantic errors if a
26*01826a49SYabin Cui  * translation unit is empty. So remove this from Linux kernel builds, but
27*01826a49SYabin Cui  * otherwise just leave it in.
28*01826a49SYabin Cui  */
29*01826a49SYabin Cui int g_debuglevel = DEBUGLEVEL;
30*01826a49SYabin Cui #endif
31