Search code examples
node.jstedious

How to stop tedious connection pool logging


I am using tedious connection pool in my Node js application. Everything is working fine but I see unnecessary logs in console. How to get rid of these log messages. I want to see logs only if anything fails.

Logs:

Tedious-Connection-Pool: filling pool with 2
Tedious-Connection-Pool: creating connection: 1
Tedious-Connection-Pool: creating connection: 2
Tedious-Connection-Pool: filling pool with 2

Solution

  • You need to change the poolConfig that you pass to new ConnectionPool so that it contains the key log: false

    Also see the example in the documentation https://github.com/tediousjs/tedious-connection-pool where log: true appears.