flatiron/winston — pull request #406 by vmadman (2014-06-15 12:34:26+00:00)
Title: Syslog Levels

In all other configs the numerical order is from lowest to highest (e.g. 'npm' has silly=0,error=5). However, the syslog levels were from highest to lowest (debug=7,emerg=0). The CLI config also had a similar order as the NPM config.

I've corrected this file to follow the same pattern. Its so obvious and fundamental that I know I am probably breaking something that has been the source of long debates or something, but I cannot think of why it is the way it is.

The main reason this change is needed is because of the behavior of the 'level' param when adding transports. Before this change, if I set the level of my console transport to 'notice', then it would listen for: debug, info, and notice. Thus, the setting would imply "Listen for this level and all levels of lower priority" (i.e. MaxLevel)

Limiting by 'Maximum Level' is counter-intuitive. More often than otherwise I would want to prevent lesser priorities from being logged.. not higher priorities. In fact, this setup would make it impossible to disable debug logging. Instead, level should refer to 'Minimum Level', enabling this setup:

```
- Debug > Console
- Info, Notice, Warning, Error, Crit, Alert, Emerg > Log File
- Notice, Warning, Error, Crit, Alert, Emerg > Logging System
- Crit, Alert, Emerg > Cell Phone
```

--

I also added some additional docs for levels.