Skip to content

Commit

Permalink
Readme: fix USE_COLORS to DEBUG_COLORS
Browse files Browse the repository at this point in the history
Also remove trailing whitespace
  • Loading branch information
TooTallNate committed Oct 22, 2016
1 parent 4e61d2a commit a4e36a8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ setInterval(function(){
```cmd
set DEBUG=*,-not_this
```

Note that PowerShell using different syntax to set environment variables.

```cmd
$env:DEBUG = "*,-not_this"
```
Expand Down Expand Up @@ -120,13 +120,13 @@ setInterval(function(){
Colored output looks something like:

![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)

## Output streams


### stderr vs stdout
By default `debug` will log to stderr, however this can be changed by setting the environment variable `DEBUG_FD` to `1` for stdout and `2` for stderr (the default value).

You can also set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:

Example _stdout.js_:
Expand Down Expand Up @@ -163,10 +163,10 @@ $ DEBUG_FD=3 node your-app.js 3> whatever.log

### Terminal colors

By default colors will only be used in a TTY. However this can be overridden by setting the environment variable `USE_COLORS` to `1`.
Note: Certain IDEs (such as WebStorm) don't support colors on stderr. In these cases you must set `USE_COLORS` to `1` and additionally change `DEBUG_FD` to `1`.
By default colors will only be used in a TTY. However this can be overridden by setting the environment variable `DEBUG_COLORS` to `1`.

Note: Certain IDEs (such as WebStorm) don't support colors on stderr. In these cases you must set `DEBUG_COLORS` to `1` and additionally change `DEBUG_FD` to `1`.

## Authors

- TJ Holowaychuk
Expand Down

0 comments on commit a4e36a8

Please sign in to comment.