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

Production logs include timestamps (Switch to Winston) #209

Open
raucao opened this issue Mar 19, 2017 · 9 comments
Open

Production logs include timestamps (Switch to Winston) #209

raucao opened this issue Mar 19, 2017 · 9 comments
Assignees
Labels
package:core Issues related to Core Sockethub package type:feature type:technical-debt

Comments

@raucao
Copy link
Contributor

raucao commented Mar 19, 2017

When using systemd, logs from journalctl contain duplicate timestamp data, because systemd adds those by itself already:

Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:layer new '/complete'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:route get '/complete'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:layer new '/'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:route new '/delayed'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:layer new '/delayed'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:route get '/delayed'
Mar 19 16:29:19 dev sockethub[8187]: Sun, 19 Mar 2017 16:29:19 GMT express:router:layer new '/'

Would probably make sense to use NODE_ENV for some of these presets, and only show timestamps in development for example.

@silverbucket
Copy link
Member

@skddc I had a look at this today, and sockethub isn't actually logging any timestamps that I can see. Is it coming from somewhere else?

@raucao
Copy link
Contributor Author

raucao commented May 10, 2017

Maybe some node.js default?

@silverbucket
Copy link
Member

silverbucket commented May 10, 2017

@skddc note node.js itself, but is it set up on the server to use some kind of service which keeps the process running? ( always, etc.)

@raucao
Copy link
Contributor Author

raucao commented May 10, 2017

systemd is adding the first timestamp in its journal. This issue is about the extra timestamp added by Sockethub.

@silverbucket
Copy link
Member

@skddc it seems to be the debug module, which automatically outputs differently based on whether it's in a tty or not.
https://github.com/visionmedia/debug

There doesn't seem to be any way to turn this off at the moment, though there does seem to be some discussion about it in this issue: debug-js/debug#370

Opened this issue: debug-js/debug#453

@raucao
Copy link
Contributor Author

raucao commented May 10, 2017

Cool.

@silverbucket silverbucket self-assigned this Sep 21, 2018
@silverbucket silverbucket added this to the v3.0 milestone Sep 21, 2018
@silverbucket
Copy link
Member

debug-js/debug#582

@silverbucket silverbucket removed this from the v3.0 milestone Sep 21, 2018
@silverbucket silverbucket added this to the Core milestone Oct 22, 2020
@silverbucket
Copy link
Member

Or possibly switch to Winston as part of the effort to implement log levels #225

@raucao
Copy link
Contributor Author

raucao commented May 28, 2021

Or possibly switch to Winston as part of the effort to implement log levels #225

That one is also being added to armadietto atm: remotestorage/armadietto#49

@silverbucket silverbucket changed the title Production logs include timestamps Production logs include timestamps (Switch to Winston) Aug 28, 2021
@silverbucket silverbucket modified the milestones: Core, Medium Priority Aug 28, 2021
@silverbucket silverbucket added package:core Issues related to Core Sockethub package and removed state:waiting-on labels Aug 28, 2021
@silverbucket silverbucket modified the milestones: 2. Important & Not Urgent, Hyperchannel Closed Demo Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:core Issues related to Core Sockethub package type:feature type:technical-debt
Projects
None yet
Development

No branches or pull requests

2 participants