Ts-node-dev: Disable console.log via option

Created on 2 Dec 2019  路  4Comments  路  Source: wclr/ts-node-dev

There is a lot of console.log functions without wrapper so there is impossible to switch off file-changes-logging.

I would like to disable the similar places:

 function start() {
    console.log(
      'Using ts-node version',
      tsNodeVersion + ', typescript version',
      tsVersion
    )
...

I suggest to add option verbose (bool) for this (for completely disabling console.log from ts-node-dev)

Most helpful comment

It would be nice to be able to quiet ts-node-dev completely. Once it is setup, I dont really care what triggers my reload, and I would like to keep my terminal free from noise so that actual errors are easier to spot and identify.

This is afterall just a 'tool' to control my own code, so I would like my own messages to show up.

Also, it is already possible to control the format of the timestamp, but not wether or not I want the messages at all, seems odd :-)

All 4 comments

Why?

I'm using ts-node-dev for developing webpack-mock-server. Webpack provides a lot of info during the compilation and logging from ts-node-dev really frustrates because it doesn't provide any useful info for user that uses webpack.
Would be better if I could control every log from ts-node-dev by wrapping console.log...
For example it might be option handleLog that can be used instead of default log function.

Also covers this kind of issues: https://github.com/whitecolor/ts-node-dev/blob/c0df64c43455d2f8ef144eb9defcd05b6fc52486/lib/index.js#L65

(extra console.log('rl.on line', line) for debugging)

It would be nice to be able to quiet ts-node-dev completely. Once it is setup, I dont really care what triggers my reload, and I would like to keep my terminal free from noise so that actual errors are easier to spot and identify.

This is afterall just a 'tool' to control my own code, so I would like my own messages to show up.

Also, it is already possible to control the format of the timestamp, but not wether or not I want the messages at all, seems odd :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

capc0 picture capc0  路  5Comments

Sytten picture Sytten  路  7Comments

Derya picture Derya  路  6Comments

urish picture urish  路  4Comments

timsuchanek picture timsuchanek  路  6Comments