Skip to content

Commit

Permalink
Add env-var control
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Ballance <[email protected]>
  • Loading branch information
mballance committed Oct 27, 2023
1 parent 725330c commit 64c0dc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DebugMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Author: mballance
*/
#include <stdexcept>
#include <stdlib.h>
#include <unistd.h>
#include "DebugMgr.h"
#include "DebugOutFile.h"
#include "Debug.h"
Expand All @@ -13,6 +15,11 @@ namespace dmgr {

DebugMgr::DebugMgr() : m_out(new DebugOutFile(stdout, false)) {
m_en = false;

const char *level = getenv("DEBUG_MGR_EN");
if (level && level[0]) {
m_en = strtoul(level, 0, 0);
}
}

DebugMgr::~DebugMgr() {
Expand Down

0 comments on commit 64c0dc2

Please sign in to comment.