add in config/dev.exs
config :my_app, MyAppWeb.Endpoint,
live_reload: [
interval: 1000,
patterns: [...],
+ web_console_logger: true
]
add in app.js
+ window.addEventListener("phx:live_reload:attached", ({detail: reloader}) => {
+ // enable server log streaming to client.
+ // disable with reloader.disableServerLogs()
+ reloader.enableServerLogs()
+ })
Source: elixirstreams