Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG_HIDE_DATE doesn't work with pm2 / in production? #695

Closed
dcsan opened this issue Mar 11, 2019 · 2 comments
Closed

DEBUG_HIDE_DATE doesn't work with pm2 / in production? #695

dcsan opened this issue Mar 11, 2019 · 2 comments

Comments

@dcsan
Copy link

dcsan commented Mar 11, 2019

DEBUG_HIDE_DATE

https://www.npmjs.com/package/debug#environment-variables

I can't seem to get this parameter to ever work in production,
and logs have half the screen taken up by dates.
is there a magic value it has to be set to, or is just anything non-empty OK?
I'm just passing true on the command line:

DEBUG=* DEBUG_HIDE_DATE=true pm2 start server.js --name $APPNAME

I'm using pm2 to run the node processes, could that be related?
since:

When stdout is not a TTY, Date#toISOString() is used, making it more useful for logging the debug information as shown below:

the output i get is of this format in the pm2 logs

902|rap    | Mon, 11 Mar 2019 04:35:00 GMT RoomsModel new room

which looks a bit different from the output on your about page:

so I assume the sstdout is still thought of as a TTY

@dcsan
Copy link
Author

dcsan commented Mar 11, 2019

so if there are alternatives to:

DEBUG_HIDE_DATE=true

or anything else I can look at please advise!

@Qix-
Copy link
Member

Qix- commented Mar 11, 2019

This environment variable is going away in the future; see #582.

Closing as a duplicate; I know it's a bug but this is really the fix here.

@Qix- Qix- closed this as completed Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants