libzypp  17.31.31
providedbg_p.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 ----------------------------------------------------------------------/
9 *
10 * This file contains private API, this might break at any time between releases.
11 * You have been warned!
12 *
13 */
14 #ifndef ZYPP_MEDIA_NG_PROVIDEDBG_P_H_INCLUDED
15 #define ZYPP_MEDIA_NG_PROVIDEDBG_P_H_INCLUDED
16 
17 #include <zypp-core/base/LogControl.h>
18 
19 L_ENV_CONSTR_FWD_DECLARE_FUNC(ZYPP_MEDIA_PROVIDER_DEBUG)
20 
21 #ifdef ZYPP_BASE_LOGGER_LOGGROUP
22 #undef ZYPP_BASE_LOGGER_LOGGROUP
23 #endif
24 
25 #define ZYPP_BASE_LOGGER_LOGGROUP "ZYPP_MEDIA_PROVIDE"
26 
27 namespace zyppng {
28  inline bool provideDebugEnabled() {
29  return zypp::log::has_env_constr_ZYPP_MEDIA_PROVIDER_DEBUG();
30  }
31 }
32 
33 #define XXX_PRV if( zyppng::provideDebugEnabled() ) XXX
34 #define DBG_PRV if( zyppng::provideDebugEnabled() ) DBG
35 #define MIL_PRV if( zyppng::provideDebugEnabled() ) MIL
36 #define WAR_PRV if( zyppng::provideDebugEnabled() ) WAR
37 #define ERR_PRV if( zyppng::provideDebugEnabled() ) ERR
38 #define SEC_PRV if( zyppng::provideDebugEnabled() ) SEC
39 #define INT_PRV if( zyppng::provideDebugEnabled() ) INT
40 #define USR_PRV if( zyppng::provideDebugEnabled() ) USR
41 
42 
43 #endif // ZYPP_MEDIA_NG_PROVIDEDBG_P_H_INCLUDED
L_ENV_CONSTR_FWD_DECLARE_FUNC(ZYPP_MEDIA_CURL_DEBUG)
bool provideDebugEnabled()
Definition: providedbg_p.h:28