arturoarevalo / winston-color

Quickly create a Winston-based logger with colored output enabled by default
MIT License
2 stars 1 forks source link

Switching from winston to winston-color throws fatal error #1

Open jhyland87 opened 8 years ago

jhyland87 commented 8 years ago

I have a logging library setup around using Winston, and I wanted to add some color to it, so I installed winston-color and switched it out with winston, and nothing else changed.

error: uncaughtException: Winston.transports.Console is not a function date=Thu Mar 17 2016 09:37:31 GMT-0700 (MST), pid=1038, uid=502, gid=20, cwd=/Users/jh..... this goes on for a while

It looks like this may be because the winston-color package doesn't have the transport Winston.transports.Console... How can I use the existing transports, but add color to the console output?

Heres the library which uses the winston package

SankaD commented 6 years ago

I added as following and it worked.

logger.add(require('winston').transports.File,.............