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

Change logger to use persistent_term for level checks #2356

Merged

Conversation

garazdawi
Copy link
Contributor

Move the primary and module-level checks into persistent_term.

I would also like to move the handler level checks (and possibly config) into persistent_term, but that is not done yet.

Also did some other small improvements/bug-fixes.

@garazdawi garazdawi added team:VM Assigned to OTP team VM enhancement labels Aug 23, 2019
@garazdawi garazdawi self-assigned this Aug 23, 2019
@bjorng
Copy link
Contributor

bjorng commented Aug 23, 2019

Since this PR contains bug fixes, shouldn't it be targeted for maint?

@garazdawi garazdawi force-pushed the lukas/kernel/logger_fixes/OTP-15948 branch from 4793d0d to 5dcfbb1 Compare August 29, 2019 08:24
@garazdawi
Copy link
Contributor Author

merged bug fix into maint, the rest will go into master

@tsloughter
Copy link
Contributor

I guess configs have to stay in ets because they need to be able to be updated without the persistent term penalty?

@garazdawi
Copy link
Contributor Author

I've not decided what to do about them yet. I may move parts of the config from ets, or maybe all of it. Updates happen very rarely so maybe it would be ok to move it all.

@tsloughter
Copy link
Contributor

Ah, ok. I'd argue for being in a persistent term and adding a note in the docs about what happens when updating the config. But maybe there are users who expect to be able to update that stuff constantly.

@garazdawi garazdawi force-pushed the lukas/kernel/logger_fixes/OTP-15948 branch from 5dcfbb1 to 2d84d86 Compare September 6, 2019 12:36
@garazdawi
Copy link
Contributor Author

I've added the handler filter to be cached in persistent_term as well.

I think I'll leave the handler config out of persistent_term, as when we have decided that we should call the handler the overhead of the actual handler will overshadow the ets lookup needed to get the config.

Move the module level config into persistent_term for
faster and more scalable lookup.
Some config calls do not need the table ref any more
as the data is stored in persistent_term, so no need
to pass it.
@garazdawi garazdawi force-pushed the lukas/kernel/logger_fixes/OTP-15948 branch from 9bc1dd1 to e32837e Compare September 26, 2019 07:57
@garazdawi garazdawi merged commit e32837e into erlang:master Oct 4, 2019
@garazdawi garazdawi deleted the lukas/kernel/logger_fixes/OTP-15948 branch October 24, 2019 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants