Logflare / logflare_logger_backend

Logger backend to send Elixir logs to Logflare.
MIT License
88 stars 17 forks source link

Fails on at least OTP-24 #65

Closed tsloughter closed 3 years ago

tsloughter commented 3 years ago

I don't know if it is the same issue or related but after getting no logs in logflare.app for my project I attempted to use the verify_config task (awesome thing to include by the way!) and it appears to be using a Finch or Mint that assumes an older version of OTP that has ssl:cipher_suites/0:

mix logflare_logger.verify_config 
You are verifying config for the dev environment
** (UndefinedFunctionError) function :ssl.cipher_suites/0 is undefined or private, use cipher_suites/2,3 instead
    (ssl 10.4) :ssl.cipher_suites()
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:626: Mint.Core.Transport.SSL.default_ciphers/0
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:518: Mint.Core.Transport.SSL.default_ssl_opts/1
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:428: Mint.Core.Transport.SSL.ssl_opts/2
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:328: Mint.Core.Transport.SSL.connect/4
    (mint 1.2.1) lib/mint/http1.ex:113: Mint.HTTP1.connect/4
    (finch 0.6.3) lib/finch/http1/conn.ex:44: Finch.Conn.connect/1
    (finch 0.6.3) lib/finch/http1/pool.ex:45: anonymous fn/8 in Finch.HTTP1.Pool.request/5

I did end up getting it to work and discovered that the actual logging must fail for the same reason as verify_config because once I added this to my mix.exs everything started showing up in logflare.app:

{:finch, "~> 0.8", override: true},
{:mint, "~> 1.3", override: true},
chasers commented 3 years ago

@tsloughter I actually have this on my task list for this week. Appreciate the issue here.

chasers commented 3 years ago

@tsloughter please try v0.8.1. I just rolled production Logflare to Elixir 1.12 and OTP 24 with this version of the logflare_logger_backend and everything is working well.

tsloughter commented 3 years ago

Yup, works for me. Thanks!