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:Jump to solution
you will only be able to see logs in the deployment logs if you log directly to stdout
9 Replies
Project ID:
f42e5e62-f103-49b3-a899-85dc38cba0b7
f42e5e62-f103-49b3-a899-85dc38cba0b7
Solution
you will only be able to see logs in the deployment logs if you log directly to stdout
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!
sorry about that, i dont know why they sent that
yeah logging packages can do funky things
I changed the output from json to simple and that does work, so I'm guessing output JSON is what is not working π
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
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 π
no problem! you as well, keep me updated though!