Analyze debug condition in template

novice3 sorryno at em.ail
Tue Oct 26 05:27:32 UTC 2021


i want to eliminate "debug(func1)" and "debug(func2)" from code:

```d
debug = func1;    // enable logging for func1
//debug = func2;  // disable logging for func2

void func1()
{
     ...
     debug(func1) logf("var1=%d", var1);
     ...
}

void func2()
{
     ...
     debug(func2) logf("var1=%d", var1);
     ...
}
```



More information about the Digitalmars-d-learn mailing list