View Source Jop (jop v0.1.0)

Documentation for Jop an in memory log

Example

iex> "mylog" ...> |> Jop.init() ...> |> Jop.log("device_1", data: 112) ...> |> Jop.log("device_2", data: 113) ...> |> Jop.flush()

Summary

Functions

erase all entries from the jop handle

write a joplog on disk from a handle. 2 logs are generated : dates.gz and keys.gz unless option :notstop is used, logging is stopped.

Initialize Jop with a log name. returns a handle %Joplog{}

returns if the handle is initialized with an ets table

log with the handle jop a key and its value returns the handle.

returns a handle from a log name does not require JOP doesn't require init/1

Types

@type t() :: %Jop{ets: atom()}

Functions

@spec clear(t()) :: t()

erase all entries from the jop handle

Link to this function

flush(joplog, opt \\ nil)

View Source
@spec flush(t(), opt :: atom()) :: t()

write a joplog on disk from a handle. 2 logs are generated : dates.gz and keys.gz unless option :notstop is used, logging is stopped.

@spec init(log_name :: binary()) :: t()

Initialize Jop with a log name. returns a handle %Joplog{}

returns if the handle is initialized with an ets table

@spec log(t(), any(), any()) :: t()

log with the handle jop a key and its value returns the handle.

@spec ref(log_name :: String.t()) :: t()

returns a handle from a log name does not require JOP doesn't require init/1