title: Winston 3.2.1 - TypeError: logger.error is not a function
body: <p>Updated to winston 3.2.1 recently. I was testing some new functionality and expected to log an error. Apperantly I found my server crashed. The reason is -> <code>TypeError: logger.error is not a function</code></p>
  
  <p>Has anyone faced that issue yet?</p>
  
  <p>My winston config: </p>
  
  <pre><code>const options: LoggerOptions = {
    level: 'info',
    format: format.combine(
      format.timestamp({
        format: 'YYYY-MM-DD HH:mm:ss'
      }),
      format.json()
    ),
    transports: [
      new transports.Console(),
      new transports.File({ filename: 'logs/error.log', level: 'error' }),
      new transports.File({ filename: 'combined.log' })
    ]
  };
  
  const logger: Logger = createLogger(options);
  
  export default logger;
  </code></pre>
  
  <p>It was imported to other modules as <code>logger.error(err.message, err);</code> and everything worked fine until now. </p>
  
  <p>I looked at index.d.ts and the Logger, and the log/error/info etc, so error indeed accepts message &amp; meta but I keep having that typeError.</p>
  
  <p>I also tried to pass as an <code>infoObject</code> - I get the same error. </p>
  
  <pre><code>interface Logger extends NodeJSStream.Transform {
      silent: boolean;
      format: logform.Format;
      levels: Config.AbstractConfigSetLevels;
      level: string;
      transports: Transport[];
      exceptions: ExceptionHandler;
      profilers: object;
      exitOnError: Function | boolean;
  
      log: LogMethod;
      add(transport: Transport): Logger;
      remove(transport: Transport): Logger;
      clear(): Logger;
      close(): Logger;
  
      // for cli and npm levels
      error: LeveledLogMethod;
      warn: LeveledLogMethod;
      help: LeveledLogMethod;
      data: LeveledLogMethod;
      info: LeveledLogMethod;
      debug: LeveledLogMethod;
      prompt: LeveledLogMethod;
      http: LeveledLogMethod;
      verbose: LeveledLogMethod;
      input: LeveledLogMethod;
      silly: LeveledLogMethod;
  
      // for syslog levels only
      emerg: LeveledLogMethod;
      alert: LeveledLogMethod;
      crit: LeveledLogMethod;
      warning: LeveledLogMethod;
      notice: LeveledLogMethod;
  
      query(options?: QueryOptions, callback?: (err: Error, results: any) =&gt; void): any;
      stream(options?: any): NodeJS.ReadableStream;
  
      startTimer(): Profiler;
      profile(id: string | number, meta?: LogEntry): Logger;
  
      configure(options: LoggerOptions): void;
  
      child(options: Object): Logger;
  
      new(options?: LoggerOptions): Logger;
    }
  </code></pre>
  
  <p>error prop-></p>
  
  <pre><code>  interface LeveledLogMethod {
      (message: string, callback: LogCallback): Logger;
      (message: string, meta: any, callback: LogCallback): Logger;
      (message: string, ...meta: any[]): Logger;
      (infoObject: object): Logger;
    }
  </code></pre>