Skip to content

Add logger #68

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add logger #68

wants to merge 5 commits into from

Conversation

plantfansam
Copy link
Contributor

❗ this PR contains commits from #67. To view the diff of just this PR, you can look at this link. ❗

This PR adds a base logger that allows the package to work in contexts outside of openresty, along with an nginx logger — configured by default — that maintains the library's current behavior.

--
-- @return nil
function _M:write(message, configured_level, callsite_level)
if configured_level >= self:log_levels()[callsite_level] then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use self.log_level here, instead of configured_level ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay on this, I will try to make this change!

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.

2 participants