13 #define NVSL_DECL_ENV(name) \
14 static const char *name##_ENV __attribute__((unused)) = (char *)(#name)
16 NVSL_DECL_ENV(NVSL_NO_STACKTRACE);
17 NVSL_DECL_ENV(NVSL_LOG_WILDCARD);
18 NVSL_DECL_ENV(NVSL_GEN_STATS);
27 static inline bool get_env_val(
const std::string var) {
30 const char *val = std::getenv(var.c_str());
32 const std::string val_str = std::string(val);
49 static inline std::string get_env_str(
const std::string var,
50 const std::string def =
"") {
51 std::string result = def;
53 const char *val = std::getenv(var.c_str());
55 result = std::string(val);