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

NodeJS 6 backwards compatible support #36

Closed
jmendiara opened this issue Apr 30, 2017 · 4 comments
Closed

NodeJS 6 backwards compatible support #36

jmendiara opened this issue Apr 30, 2017 · 4 comments
Labels

Comments

@jmendiara
Copy link
Member

jmendiara commented Apr 30, 2017

Tests are failing for node6, mostly for some changes in how dates and errors are now default printed by util.format

@jmendiara jmendiara added the bug label Apr 30, 2017
@jmendiara
Copy link
Member Author

jmendiara commented May 1, 2017

It's... complicated. Node6 incorporated these breaking changes that we inherit (ref https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#util)

As we delegate in utils.format per design and to be developer friendly

With the rest of arguments is just like calling console.log. It will be serialized as the trace message. Easy to remember.

My proposal is

  1. Make a 1.0.8 release to npm making node<6 compatible. package.json
{ "engines" : { "node" : "<6" } }
  1. Deprecate logops v1.X npm releases in favour to the new 1.0.8 release to warn the user about the issue (https://docs.npmjs.com/cli/deprecate)
  2. Create logops v2 with node6 compatible engine
{ "engines" : { "node" : ">=6" } }

@gtorodelvalle do you still want the pipe format to be maintained for this new v2 release?
CC/ @telefonicaid/logops

@palmerabollo
Copy link
Member

palmerabollo commented May 1, 2017

Your proposal sounds very good to me.

Another option, if we don't want to maintain the pipe format in v2, would be to give up and use https://github.com/trentm/node-bunyan (even if it's slower than logops) that would already fix #35 as well. I guess our utilities in the Telefonica ecosystem (Telefonica/node-express-logging, etc) would keep working, since they only use simple logger.xxx functions. I don't know, I have a personal attachment to logops :)

@jmendiara
Copy link
Member Author

I personally like some logops features that bunyan does not have:

  • ENV_VARS configuration
  • Clean integration with errors logging that have cause(eg: Therror)
  • Performance
  • Usage without instantiation
  • DEV format without piping to another utility
  • Not printing these opinionated hostname and pid that does not have sense in modern/dockerized environments

Also, having 2,175 downloads in the last month although is not too much, keeps me thinking that these 15 public packages deserve some extra effort from my side

I'll keep maintaining this

@jmendiara
Copy link
Member Author

jmendiara commented May 3, 2017

Fixed by #39

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

No branches or pull requests

2 participants