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

Add warning logs for unauthorized subscribe #1878

Merged
merged 1 commit into from Oct 18, 2018

Conversation

@gilbertwong96
Copy link
Contributor

gilbertwong96 commented Sep 30, 2018

Prior to this change, there is no log for unauthorized subscribe, it is
difficult to debug the problem when subscription error occurred.

Prior to this change, there is no log for unauthored log, it is
difficult to find the problem when subscription error occured.
@gilbertwong96 gilbertwong96 requested review from emqplus and huangdan Sep 30, 2018
@coveralls

This comment has been minimized.

Copy link

coveralls commented Sep 30, 2018

Pull Request Test Coverage Report for Build 3449

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 57.023%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/emqx_protocol.erl 0 2 0.0%
Totals Coverage Status
Change from base Build 3447: 0.4%
Covered Lines: 2387
Relevant Lines: 4186

💛 - Coveralls
@huangdan huangdan added this to the 3.0-rc.1 milestone Oct 9, 2018
deny -> {error, [{Topic, SubOpts#{rc := ?RC_NOT_AUTHORIZED}}|Acc]}
deny ->
emqx_logger:warning([{client, PState#pstate.client_id}],
"ACL(~s) Cannot SUBSCRIBE ~p for ACL Deny",

This comment has been minimized.

Copy link
@spring2maz

spring2maz Oct 10, 2018

Contributor

~s for Topic?

This comment has been minimized.

Copy link
@gilbertwong96

gilbertwong96 Oct 10, 2018

Author Contributor

Yes, what's wrong?

This comment has been minimized.

Copy link
@spring2maz

spring2maz Oct 10, 2018

Contributor

~p is wrong, it will print <<"....">>

This comment has been minimized.

Copy link
@gilbertwong96

gilbertwong96 Oct 10, 2018

Author Contributor

I supposed that it is better to print <<"....">> for topic filters.

This comment has been minimized.

Copy link
@spring2maz

spring2maz Oct 10, 2018

Contributor

ok. fair enough.

@emqplus emqplus changed the title Add warning log for unauthored subscribe Add warning logs for unauthorized subscribe Oct 18, 2018
@emqplus emqplus removed the request for review from huangdan Oct 18, 2018
@emqplus emqplus self-assigned this Oct 18, 2018
@emqplus emqplus added the Enhancement label Oct 18, 2018
@emqplus emqplus merged commit 30d986c into emqx30 Oct 18, 2018
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.4%) to 57.023%
Details
@emqplus emqplus deleted the LogEnhance branch Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.