Out/Error log question

Hello everyone:
I'm trying to locate an error here with digital ocean, pm2
Working with nodejs, nginx
When debug is on, all output is treated as an error..

For example this is located under nameapp-error.log:

2025-01-21T20:52:55.160Z server-connect:app Executing action step setvalue
2025-01-21T20:52:55.161Z server-connect:app options: { value: '{{shortname}}' }
2025-01-21T20:52:55.161Z server-connect:output user: 'Name'
2025-01-21T20:52:55.161Z server-connect:app Executing action step setvalue
2025-01-21T20:52:55.161Z server-connect:app options: { value: 1 }
2025-01-21T20:52:55.162Z server-connect:output tareas: 1

As you can see is just a simple output, but this goes with all of them..
And under nameapp-out.log I can only see:

App listening at http://localhost:4000

And nothing else..

Those logs are obviously generated by pm2 and has nothing to do with Wappler
But those outputs, are considered as stdout/stderr under nodejs enviroment? If so, it's a bug and they're not separated?

Hope I made myself clear, and thanks!

Bug, debug logs should go in stdout, not stderr

We use the debug module for outputting the logging ( GitHub - debug-js/debug: A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers ). The default output of the module is stderr, will see if I can perhaps change it to stdout instead.

Following updated file should output all debug messages to stdout, errors are still being outputted to stderr.

server.zip (1.4 KB) unzip to lib

Perfect @patrick
I can also see:

image

That means that every server connect error will be printed on stdout and stderr ?
Just asking, this is fine by me :slight_smile:

Thanks!

This is duplicate logging! Not fine! :grimacing:

Only errors and warnings are printed to stderr, most errors will not be printed on stdout unless there was some debug logging for that specific error.

Got it, amazing @patrick
Thanks once again :clap:t2:

Fixed in Wappler 7 beta 16

1 Like