Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions templates/new/rootfs_overlay/etc/iex.exs
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Add Toolshed helpers to the IEx session
use Toolshed

if RingLogger in Application.get_env(:logger, :backends, []) do
IO.puts """
RingLogger is collecting log messages from Elixir and Linux. To see the
messages, either attach the current IEx session to the logger:
try do
if RingLogger in Application.get_env(:logger, :backends, []) do
IO.puts("""
RingLogger is collecting log messages from Elixir and Linux. To see the
messages, either attach the current IEx session to the logger:

RingLogger.attach
RingLogger.attach

or print the next messages in the log:
or print the next messages in the log:

RingLogger.next
"""
RingLogger.next
""")
end
catch
what, reason ->
IO.puts("""
Something was thrown in your iex.exs. It was caught so that it wouldn't
exit the Erlang VM.

#{inspect(what)}: #{inspect(reason)}
""")
end

# Be careful when adding to this file. Nearly any error can crash the VM and
# cause a reboot.
# Be careful when adding outside of the try...catch. Nearly any error can crash
# the VM and cause a reboot.