Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Jul 5, 2019
1 parent d7f94f8 commit 05ed0e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ module to your project us the following command...
build add heapwolf/debug
```

If the `DEBUG` environment variable is contained in the `name` that the instance
is contstructed with, the debug output be printed. For example...
Construct an instance of `Debug` with a name. The instance will allow you to
toggle the debug output for different parts of your program.

The DEBUG environment variable is used to enable these based on delimited names.

#### COMMAND
```bash
Expand All @@ -30,17 +31,15 @@ DEBUG=bands ./musicprogram
Debug debug("demo");
Debug debug3("demo:beep");

int f3 () {
void f3 () {
Debug debug2("demo:boop");
debug2("running function f3");
debug3("running function f3");
return 0;
}


int f2 () {
void f2 () {
debug("running function f2");
return f3();
f3();
}

int main () {
Expand Down
7 changes: 3 additions & 4 deletions test/demo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
Debug debug("demo");
Debug debug3("demo:beep");

int f3 () {
void f3 () {
Debug debug2("demo:boop");
debug2("running function f3");
debug3("running function f3");
return 0;
}


int f2 () {
void f2 () {
debug("running function f2");
return f3();
f3();
}

int main () {
Expand Down

0 comments on commit 05ed0e2

Please sign in to comment.