Giter VIP home page Giter VIP logo

logger-telegram-backend's People

Contributors

adriankumpf avatar dependabot-preview[bot] avatar dependabot[bot] avatar mvalitov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

logger-telegram-backend's Issues

Logging not working when using a remote console

I'm a bit puzzled about this: if I release an app with mix distillery.release and start it with _build/dev/rel/testapp/bin/testapp console, Logger.error("test") will correctly result in the bot sending a message. If I connect to the very same app by _build/dev/rel/testapp/bin/testapp remote_console, Logger.error("test") will result in an error:

[error] GenServer #PID<0.107.0> terminating
** (stop) {:EXIT, {{:badmatch, {:error, %Mint.TransportError{reason: :ssl_not_started}}}, [{LoggerTelegramBackend, :handle_event, 2, [file: 'lib/telegram_logger_backend.ex', line: 47]}, {:gen_event, :server_update, 4, [file: 'gen_event.erl', line: 577]}, {:gen_event, :server_notify, 4, [file: 'gen_event.erl', line: 559]}, {:gen_event, :handle_msg, 6, [file: 'gen_event.erl', line: 300]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}
Last message: {:gen_event_EXIT, LoggerTelegramBackend, {:EXIT, {{:badmatch, {:error, %Mint.TransportError{reason: :ssl_not_started}}}, [{LoggerTelegramBackend, :handle_event, 2, [file: 'lib/telegram_logger_backend.ex', line: 47]}, {:gen_event, :server_update, 4, [file: 'gen_event.erl', line: 577]}, {:gen_event, :server_notify, 4, [file: 'gen_event.erl', line: 559]}, {:gen_event, :handle_msg, 6, [file: 'gen_event.erl', line: 300]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}

I tried to add :ssl to the extra_applications, to no avail. What could be the cause of such a behavior?

I attached a minimal app to test, just mix distillery.release and run it as I explained above

testapp 2.zip

Thanks!

Avoid [error] GenServer terminating

In lib/telegram_logger_backend.ex:47 the match :ok = log_event(level, message, timestamp, metadata, state) can end up in the GenServer terminating in case the returned value is, for example, {:error, reason} instead of :ok, which is not necessarily bad, if I understand well how Mint works (also see elixir-mint/mint#211). Would it make sense to ignore the returned value?

Thanks

unknown registry?

I think I need a little help with the configuration:

In config.ex, I have:

adapter: {Tesla.Adapter.Finch, name: LoggerTelegramBackend.Finch}

in application.ex:

{Finch, name: LoggerTelegramBackend.Finch} is one of the children

but when I start the app, I get:

[error] :gen_event handler LoggerTelegramBackend installed in Logger terminating
** (ArgumentError) unknown registry: LoggerTelegramBackend.Finch

what am I missing?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.