Vcsn  2.2
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 }
Definition: a-star.hh:8
static int debug_level()
Debug level set in the user's environment.
Definition: debug-level.hh:11