R
Railwayβ€’14mo ago
Limas

Winston logs not appearing in deployment logs

In my node.js deployment if I do a console.log it appears normally in deployment logs, but using winston with info logging level messages never appear. Locally the log messages appear normally in the console. What could be causing this issue?
Solution:
you will only be able to see logs in the deployment logs if you log directly to stdout
Jump to solution
9 Replies
Percy
Percyβ€’14mo ago
Project ID: f42e5e62-f103-49b3-a899-85dc38cba0b7
Limas
Limasβ€’14mo ago
f42e5e62-f103-49b3-a899-85dc38cba0b7
Solution
Brody
Brodyβ€’14mo ago
you will only be able to see logs in the deployment logs if you log directly to stdout
Limas
Limasβ€’14mo ago
Ohh I see, I was expecting the library to do that since I configured to log to console, but let me double check if not I'll just refactor to use console.log, thanks!
Brody
Brodyβ€’14mo ago
sorry about that, i dont know why they sent that yeah logging packages can do funky things
Limas
Limasβ€’14mo ago
I changed the output from json to simple and that does work, so I'm guessing output JSON is what is not working πŸ™‚
Brody
Brodyβ€’14mo ago
well the format doesn't matter, it's how it's sent to stdout make sure there's no buffer thing going on? if it's json the library might try to stream it to stdout, and that's not gonna work
Limas
Limasβ€’14mo ago
Yeah, I'll keep trying different things but at least for now seeing the output even in plain is good enough, thanks a lot for your help, have an awesome weekend πŸ˜„
Brody
Brodyβ€’14mo ago
no problem! you as well, keep me updated though!
Want results from more Discord servers?
Add your server