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

Decide which logging tool to use #76

Open
stevenzeck opened this issue Apr 8, 2018 · 6 comments
Open

Decide which logging tool to use #76

stevenzeck opened this issue Apr 8, 2018 · 6 comments

Comments

@stevenzeck
Copy link
Contributor

stevenzeck commented Apr 8, 2018

Ideas below. This would be used across all unibeautify projects.

https://github.com/winstonjs/winston (mind as well use the 3.0.0 RC)

@Glavin001
Copy link
Member

Winston is good. I've recently used https://github.com/log4js-node/log4js-node as well.

@stevenzeck
Copy link
Contributor Author

Winston 3.x also has native typings, no having to use @types.

@Glavin001
Copy link
Member

That is a massive selling point 👍

@stevenzeck
Copy link
Contributor Author

Does log4js-node output to the console as well without the need to do event listeners and/or callbacks?

@Glavin001
Copy link
Member

log4js-node uses appenders: https://log4js-node.github.io/log4js-node/appenders.html

@stevenzeck
Copy link
Contributor Author

stevenzeck commented Apr 13, 2018

I have a POC in https://github.com/szeck87/atom-beautify/blob/unibeautify/src/logger.ts. It's messy, I hope it can be cleaned up once the typings for Winston 3.x are available. I'm disappointed there isn't a standard transport to output to console.log, instead it looks to use process.stdout.write.

I'm also not sure how to invoke the import with the filename/path of the file that is doing the import to include in the log output. @Glavin001 I'll probably definitely need help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants