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

Replace GenEvent with alternatives #15

Open
davejlong opened this issue Sep 26, 2017 · 1 comment
Open

Replace GenEvent with alternatives #15

davejlong opened this issue Sep 26, 2017 · 1 comment

Comments

@davejlong
Copy link
Member

GenEvent has been deprecated as of Elixir 1.5. Suggested replacements are Supervisor with GenServers or GenStage. I'm interested in trying GenStage as it's geared to be more stable, handling backpressure and multiple ways to handle the log output.

@davejlong
Copy link
Member Author

Thinking about it, a decent solution, which could be a handy alternative to Elixir's Logger library is to refactor probe with GenStage. There would be 3 stages:

  1. Event Producer (Probe.EventHandler)
  2. Event Formatter (Probe.JSONHandler)
  3. Event Writer (Probe.LogWriter)

This would enable Probe to be more modular in cases where someone might want to use an alternative log formatter, or alternative log writer. For example, instead of writing the log to a file, someone could replace LogWriter with LogstashWriter and write out to a log stash service.

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

No branches or pull requests

1 participant