View Source MetaLogger.Slicer.DefaultImpl (MetaLogger v1.9.1)
Responsible for slicing log entries according to the given max length option.
Summary
Functions
Returns sliced log entries according to the given max entry length.
Functions
Returns sliced log entries according to the given max entry length.
If the entry is smaller than given max length, or if :infinity
is given
as option, a list with one entry is returned. Otherwise a list with multiple
entries is returned.
Examples
iex> MetaLogger.Slicer.DefaultImpl.slice("1234567890", 10)
["1234567890"]
iex> MetaLogger.Slicer.DefaultImpl.slice("1234567890", :infinity)
["1234567890"]
iex> MetaLogger.Slicer.DefaultImpl.slice("1234567890", 5)
["12345", "67890"]