@phenomlab yes , it is fixed now 👍
adding some console.log to Nodebb
I’m trying some code small addition to NodeBB.
for debugging purposed where do any outputs from console.log() go?
Usually, when I run my own stand-alone node code it ‘hangs the screen’ until Ctrl-X out of it, hence you can see console.logs
But as nodeBB runs as a service in the background, you dont see console.log output on the screen
What I want is a note to myself on server, not viewable front end.
for example Ive added some code which doesnt work, and I want to log (somewhere)
“Reached this code”
So I want to console log to a server side file I can go and read to help me debug.
Is there a nodebb log already in use I can write to?
I tried making my own txt file as using fs.writeFile and that did not work, but thinking some built in console.log command would be simpler
@eeeee if you’re using the console, you could try
node app.js > app.log 2>&1
This would redirect stdout to a file named app.log and redirect stderr to stdout.
I’m not sure about standard logging under NodeBB, but there is an error log located at
Failing that, you could always stop the NodeBB service then use
./nodebb devfrom the console which would then provide debug output.