Vcsn  2.3
Be Rational
debug-level.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdlib>
4 #include <boost/lexical_cast.hpp>
5 
6 namespace vcsn
7 {
8  namespace detail
9  {
11  static inline int debug_level()
12  {
13  if (auto cp = getenv("VCSN_DEBUG"))
14  return *cp ? boost::lexical_cast<int>(cp) : 1;
15  else
16  return 0;
17  }
18  }
19 }
static int debug_level()
Debug level set in the user's environment.
Definition: debug-level.hh:11
Definition: a-star.hh:8
T lexical_cast(const std::string &str)
String to templated type T conversion.
Definition: cast.hh:79