title: Winston : understanding logging levels
body: <p>Reading and fiddling with Winston, I'm puzzled as to why the logging levels are ordered as they are and why the transports behave in the way they do (well, at least the Console one). I'd appreciate if someone could, perhaps even thoroughly, with real use case examples, explain why logging with Winston works this way?</p>
  <p>For example, I setup my logger like this :</p>
  <pre><code>var logger = new (winston.Logger)({
    levels: winston.config.syslog.levels,
    colors: winston.config.syslog.colors,
    level: &quot;debug&quot;,  // I'm not sure what this option even does here???
    transports: [
      new (winston.transports.Console)({
        colorize: true,
        handleExceptions: true,
        json: false,
        level: &quot;debug&quot;
      })
    ]
  });
  </code></pre>
  <p>So, if I do <code>logger.debug(&quot;Test&quot;);</code>, then it will log <code>debug: Test</code>, fine. But if I do <code>logger.info(&quot;Test&quot;);</code>, then nothing happens.</p>
  <p>The problem I have is that, If I want to log to the console <em>eveverything</em> <strong>but</strong> <code>debug</code> messages, what do I do? ... or even <code>debug</code> <em>and</em> <code>info</code> messages, but log everything else?</p>
  <p>Coming from a Java world, using the standard loggers, I am used to having <code>debug</code> being more &quot;fine grained&quot; than <code>warn</code> and the loggers worked backwards; setting the logging level to <code>info</code>, for example, did log everything but <code>debug</code> (or something).</p>
  <p>Also, what if I'd like a logger to log only <code>error</code>, <code>warning</code> and <code>info</code> messages, how would I do that with Winston?</p>
  <h3>* EDIT *</h3>
  <p>Apparently, this order of level is unique to <code>winston.config.syslog.levels</code>. So the only question remaining is : &quot;Is it possible to, somehow, restrict a transport to a very specific logging level only?&quot;</p>