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

app.silent option to turn off err logging #486

Merged
merged 2 commits into from
Oct 9, 2015
Merged

app.silent option to turn off err logging #486

merged 2 commits into from
Oct 9, 2015

Conversation

tejasmanohar
Copy link
Member

Solves #447

// cc participants- @jonathanong @tj @cesarandreu

@tejasmanohar tejasmanohar mentioned this pull request Oct 5, 2015
@tj
Copy link
Member

tj commented Oct 6, 2015

lgtm. I guess this sort of crosses over into the logging discussions we had somewhere else too

@tejasmanohar
Copy link
Member Author

@tj hm, somewhere else as in #447 or elsewhere? (sorry, pretty new to koa)

@tj
Copy link
Member

tj commented Oct 6, 2015

I think it's scattered a bit, some in #367, and #219 is somewhat related. I'll leave this open for a little if anyone else wants to give some feedback but it works for me! thanks man

cc @koajs/owners

@tejasmanohar
Copy link
Member Author

alrighty.

are we going to consider this a breaking change? i guess it does change what logs when and based on what... so kinda breaks the existing API. but then again, it is for logging so meh.

@travisjeffery
Copy link
Member

Works for me too. I'm okay wither way w.r.t. to versioning, but based on expierence with other projects people tend to complain a lot even if you change logging and don't follow semver strictly.

@tejasmanohar
Copy link
Member Author

@travisjeffery yeah, i think a major version would be a good idea... like 1.1

@tj
Copy link
Member

tj commented Oct 8, 2015

Since it's just test related I think it would be fine, unless we leave that 'test' == check in until 2.x, doesn't really hurt

@tejasmanohar
Copy link
Member Author

@tj Ah ok, you're right- would you like me to add the 'test'' env check back in AFTER the this.silent check? that would make it a non-breaking change.

@tejasmanohar
Copy link
Member Author

i.e.

if (this.silent) return;
if ('test' == this.env) return;

so codebases relying on the 'test' env to not log won't be affected by this change. in v2, we can remove the 'test' env check and make people use the silent option? @tj

@tj
Copy link
Member

tj commented Oct 8, 2015

sounds great! maybe throwing in a comment so we remember to deprecate it later // DEPRECATE (v2) or something

@tejasmanohar
Copy link
Member Author

done- 6c19c41. yay for semver!

@fengmk2
Copy link
Member

fengmk2 commented Oct 9, 2015

LGTM.

fengmk2 added a commit that referenced this pull request Oct 9, 2015
app.silent option to turn off err logging
@fengmk2 fengmk2 merged commit f875eb0 into koajs:master Oct 9, 2015
@tejasmanohar tejasmanohar deleted the app_silent branch October 9, 2015 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants