Winston: Attempt to write logs with no transports

后端 未结 3 1834
不思量自难忘°
不思量自难忘° 2021-02-20 10:24

I\'m trying to set up an access log and an error log for my express server using Winston, but I seem to be doing something wrong.

Here is my attempt at a config file:

3条回答
  •  感情败类
    2021-02-20 10:33

    Since you were creating the winston variable in the original code as const winston it wasn't able to add transports and other options in the following lines. The proposed solution moves the similar code into a module but assigns winston variable into var winston.

提交回复
热议问题