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

Logging #30

Open
CrowdHailer opened this issue Jun 10, 2020 · 2 comments
Open

Logging #30

CrowdHailer opened this issue Jun 10, 2020 · 2 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@CrowdHailer
Copy link
Contributor

Can be hardcoded as a first version.

@CrowdHailer CrowdHailer added the help wanted Extra attention is needed label Jun 10, 2020
@CrowdHailer CrowdHailer added this to the 1.0.0 milestone Jun 10, 2020
@CrowdHailer
Copy link
Contributor Author

Added a simple structured logger.

Article on new OTP logger. https://ferd.ca/erlang-otp-21-s-new-logger.html

Question of how to add meta data.

logger.log(Level, [field(..)], [field(..)])

OR

logger.with_metadata([field(..)], fn() {
  logger.log
})

This puts it in the process dictionary and returns. Quite long winded to not have a second/third argument to logger.log calls.

logger.report(Warn)
|> with_field(..)
|> with_meta(..)
|> logger.log()

logger.text(Warn, "my bad")
|> with_meta()
|> logger.log()

@CrowdHailer
Copy link
Contributor Author

timber.io doesn't seem very alive any more, check out https://logflare.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

1 participant