RamoopsLogger (ramoops_logger v0.4.0)
View SourceThis module provides an in-memory log handler for the Erlang logger that can survive reboots.
After a reboot, you can check if a log exists by calling available_log?/0.
Summary
Functions
Check to see if there a log
Dump the contents of the ramoops pstore file to the console
Read the file contents from the ramoops pstore file. This is useful if you want to pragmatically do something with the file contents, like post to an external server.
Return the path to the recovered log
Functions
@spec available_log?() :: boolean()
Check to see if there a log
@spec dump() :: :ok | {:error, File.posix()}
Dump the contents of the ramoops pstore file to the console
@spec read() :: {:ok, binary()} | {:error, File.posix()}
Read the file contents from the ramoops pstore file. This is useful if you want to pragmatically do something with the file contents, like post to an external server.
@spec recovered_log_path() :: Path.t()
Return the path to the recovered log
The path won't exist if there was nothing to recover on boot.