jsonlex v0.1.0 Jsonlex

Jsonl is jsonl format logger. This provide simple storage approach.

Jsonl can write json data concurrently that prevent applications slow down. We can analize unstructure data using like Pandas etc. Jsonl use Jason for json encoder. It allows this module blazing fast writing jsonl files.

Fortunately, Elixir can handle huge amount files using multicore processes and have massive tools easily.

iex> Jsonlex.start_link :jsonl, filename: "/tmp/some_filename.jsonl"
iex> Jsonlex.puts :jsonl, %{"ts" => DateTime.utc_now |> DateTime.to_unix, "hoge" => "fuga"}

Jsonlex allow datetime format.

iex> Jsonlex.start_link :jsonl, format: "/tmp/some_storage/%Y-%m-%d-%H.jsonl"

Close file.

iex> Jsonlex.close :jsonl

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Close file

Write json to file

Create Jsonlex logger process it allows to set datetime format filename.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Close file

Link to this function

puts(pid, body)

Write json to file

Link to this function

start_link(name, opts \\ [])

Create Jsonlex logger process it allows to set datetime format filename.

Examples

iex> Jsonlex.start_link :jsonl, filename: "/tmp/some_filename.jsonl"

Jsonlex allow datetime format.

iex> Jsonlex.start_link :jsonl, format: "/tmp/some_storage/%Y-%m-%d-%H.jsonl"