languages / node / installation / stdout

Node STDOUT Installation

  1. In your shell, run: prefer to integrate with your platform instead?

    1
    npm install --save timber
    
  2. In your entry file, add:

    1
    2
    3
    const timber = require('timber');
    
    timber.config.append_metadata = true
    
  3. Optionally install middleware:

  4. Optionally integrate with your logger:

    • Using winston? (learn more)

      1
      2
      winston.remove(winston.transports.Console);
      winston.add(winston.transports.Console, { formatter: timber.formatters.Winston });
      
    • Using bunyan? (learn more)

      1
      2
      3
      4
      const log = bunyan.createLogger({
        name: 'Logger',
        stream: timber.transports.Bunyan
      });
      
Questions?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up