title: Using Winston in typescript
body: <p>I can't figure how to use the logging module Winston in typescript. I have an error when I try to set the logger level, and another one when I try to log an error:</p>
  
  <pre><code>import * as logger from "winston";
  
  logger.level = 'debug';
  // [ts] Cannot assign to 'level' because it is a constant or a read-only property.
  
  logger.error(new Error('test'));
  // [ts] Argument of type 'Error' is not assignable to parameter of type 'string'.
  </code></pre>
  
  <p>I have added both <code>winston</code> and <code>@types/winston</code> to my project.</p>
  
  <hr>
  
  <p><strong>Edit:</strong> to complete Joshua answer, it seem that by default winston logs to... nowhere. You have to add a transport to make it work:</p>
  
  <pre><code>import * as logger from "winston";
  
  logger.configure({
      level: 'debug',
      transports: [
          new logger.transports.Console({
              colorize: true
          })
      ]
  });
  </code></pre>