Collect logs from your Erlang application.
Add betterstack_logger to your project dependencies using Rebar or Mix.
Configure betterstack_logger in your application's configuration file,or add it programmatically via Logger API:
To avoid cyclic dependency, it's not currently possible to set betterstack_logger as default handler via sys.config.
Use the Erlang logger module as usual. Your log events will be sent to Better Stack automatically.
You should see your logs in Better Stack → Live tail.
Huge thanks to Silviu Caragea who maintains the betterstack_logger library as an MIT-licenced open-source! ❤️
Please reach out to us at hello@betterstack.com.
We're happy to help! 🙏
Ensure your application terminates gracefully, giving the logger enough time to finish sending logs to BetterStack.
Use init:stop() to end your application properly.
Avoid using erlang:halt(), as it terminates all processes immediately and may drop your logs.
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.