Module logi_sink_file_rotator_daily

A logi_sink_file_rotator implementation which rotates files by day.

Copyright © 2015-2016 Takeru Ohta <phjgt308@gmail.com>

Behaviours: logi_sink_file_rotator.

Description

A logi_sink_file_rotator implementation which rotates files by day

EXAMPLE

  > Rotator = logi_sink_file_rotator_daily:new().
  > Sink = logi_sink_file:new(foo, "/tmp/{YYYY}-{MM}-{DD}-sample.log", [{rotator, Rotator}]).
  > {ok, _} = logi_channel:install_sink(Sink, debug).
  > logi:info("hello world").
  > file:read_file("/tmp/2015-11-04-sample.log").
  {ok,<<"2015-11-04 00:47:39.105 [info] nonode@nohost <0.114.0> erl_eval:do_apply:673 [] hello world\n">>}
  

Function Index

new/0Equivalent to new(logi_sink_file_rotator_noop:new()).
new/1Creates a new rotator instance.

Function Details

new/0

new() -> logi_sink_file_rotator:rotator()

Equivalent to new(logi_sink_file_rotator_noop:new()).

new/1

new(BaseRotator::logi_sink_file_rotator:rotator()) -> logi_sink_file_rotator:rotator()

Creates a new rotator instance


Generated by EDoc, Sep 27 2018, 23:13:24.