mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
THNEED_DEBUG env var support
old-commit-hash: 83159a09bfc814fba66d6f1b9ec9e317dc202713
This commit is contained in:
@@ -223,6 +223,12 @@ Thneed::Thneed(bool do_clinit) {
|
||||
record = THNEED_RECORD;
|
||||
timestamp = -1;
|
||||
g_thneed = this;
|
||||
char *thneed_debug_env = getenv("THNEED_DEBUG");
|
||||
if (thneed_debug_env != NULL) {
|
||||
int thneed_debug_level = atoi(thneed_debug_env);
|
||||
record |= (thneed_debug_level >= 1) ? THNEED_DEBUG : 0;
|
||||
record |= (thneed_debug_level >= 2) ? THNEED_VERBOSE_DEBUG : 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Thneed::stop() {
|
||||
|
||||
Reference in New Issue
Block a user