• Andrew Thompson's avatar
    Improve the performance of the file backend · 79ea55a1
    Andrew Thompson authored
    This is done via a combination of several things:
    * Make the loglevel that triggers a sync configurable
    * Make the delayed_write size and intervals configurable
    * Make the interval at which external rotation is checked for
      configurable
    * Store the timestamp a lager_msg was created inside the lager_msg
    
    To support these changes, several other things had to be modified:
    * lager_msg:timestamp now returns a timestamp
    * lager_msg:datetime was added to return the {date, time} of a message,
      like lager_msg:timestamp used to
    * The configuration syntax for file backends was changed to be of the
      form {lager_file_backend, proplist()} and the old syntax was
      deprecated
    
    Additionally, the defaults for the check_interval was raised from
    'always' to 1 second, and the sync_interval was changed from 2 seconds
    to one second.
    79ea55a1
lager.erl 12.3 KB