Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Mar 22, 2013
  1. @Vagabond

    Merge pull request #120 from basho/adt-msg-has-datetime

    Vagabond authored
    Improve the performance of the file backend
Commits on Mar 19, 2013
  1. @Vagabond
  2. @Vagabond

    Merge pull request #124 from DeadZen/dz-lager-colors

    Vagabond authored
    This change implements a color spectrum for severity levels, disabled by default.
  3. @DeadZen
  4. @Vagabond

    Merge pull request #121 from basho/adt-pdict-metadata

    Vagabond authored
    Allow storage of persistant per-process lager metadata
Commits on Mar 16, 2013
  1. @Vagabond

    Improve the performance of the file backend

    Vagabond 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.
Commits on Mar 15, 2013
  1. @Vagabond

    Allow storage of persistant per-process lager metadata

    Vagabond authored
    For persistant processes with some immutable metadata (riak vnode and
    the vnode ID, for example), implement lager:md/0 and lager:md/1 for
    getting/setting such metadata into the process dictionary.
    
    Such metadata is automatically included in any lager message metadata,
    so you can just set it in your init() function or whatever and not have
    to worry about passing the data around and using it in every lager call.
  2. @Vagabond
  3. @Vagabond

    Merge pull request #118 from basho/adt-skip-fast

    Vagabond authored
    In code generated by the parse_transform skip unloggable messages fast
  4. @Vagabond
  5. @Vagabond

    In code generated by the parse_transform skip unloggable messages fast

    Vagabond authored
    Originally an idea that Dizzy forwarded to me from Tony Rogvall.
    Basicially all the work lager does gathering metadata and stuff is
    wrapped in a case statement that fails-fast if the message is definitely
    not going to be logged; the severity isn't currently being consumed and
    there's no traces installed.
    
    In my simple test, logging 1 million debug messages, when the debug
    level is not being consumed, goes from taking 2.99 seconds to 1.21
    seconds with this change.
    
    Also, lager pre 1.0 actually had something similar to this, but it was
    removed during a refactor and never re-added.
Commits on Mar 14, 2013
  1. @Vagabond

    Merge pull request #117 from basho/adt-sync-switch

    Vagabond authored
    Switch between gen_event notify/sync_notify based on message queue length
  2. @Vagabond
  3. @Vagabond

    Cleanups suggested by @mshonle

    Vagabond authored
  4. @Vagabond

    Merge pull request #119 from basho/adt-fix-coverage

    Vagabond authored
    Fix 'must be purged before loading' warnings
  5. @Vagabond
  6. @Vagabond

    Merge pull request #110 from basho/adt-http-errors

    Vagabond authored
    Webmachine/Cowboy error pretty-printing
  7. @Vagabond
  8. @Vagabond

    Merge pull request #109 from basho/adt-crash-log-false

    Vagabond authored
    Lager failed after long sleep of computer
Commits on Mar 13, 2013
  1. @Vagabond

    Merge pull request #111 from basho/adt-1.2-compat

    Vagabond authored
    Compatability with beams compiled with lager 1.2
  2. @Vagabond
Commits on Mar 12, 2013
  1. @Vagabond
  2. @Vagabond

    Merge pull request #114 from ewanmellor/fix-min-level

    Vagabond authored
    Add an update to the global loglevel when a new handler is installed
Commits on Mar 11, 2013
  1. @Vagabond

    Merge pull request #116 from basho/adt-msg-drop

    Vagabond authored
    Implement configurable error_logger msg drop threshold
  2. @slfritchie @Vagabond

    A few small things:

    slfritchie authored Vagabond committed
    1. Add set_high_water/1 to adjust the high water mark after startup
    2. Add test func t0/0 to demo (interactively only, sorry) that the
       limiting is working as we expect).
    3. Remove a couple of comments.
  3. @Vagabond

    Implement configurable error_logger msg drop threshold

    Vagabond authored
    Implement a new config option error_logger_hwm, which is a number
    representing how many messages per second we should log from the
    error_logger. If that threshold is exceeded, messages will be discarded
    for the remainder of that second.
    
    This is only effective if lager itself can process the messages fast
    enough to satisfy the threshold. If your threshold is 1000 and lager
    itself is only writing 100 messages a second (because error messages are
    causing fsyncs or whatever) you'll never exceed the threshold and drops
    will never happen. Thus care needs to be taken when selecting this
    feature.
    
    Setting it low is not as bad as it might seem, because when using lager,
    hopefully error_logger messages are unusual. In my testing, 50/second
    with the default config seemed reasonable (which has 2 file backends
    installed, both of which fsync on messages at error or above).
Commits on Mar 8, 2013
  1. @Vagabond

    Switch between gen_event notify/sync_notify based on message queue le…

    Vagabond authored
    …ngth
    
    In normal operation, there's no need for log messages to be synchronous.
    Its slower and introduces a global serialization point in the
    application.
    
    However, when in an overload condition, synchronous logging is good
    because it limits each process to at most 1 log message in flight.
    
    So, this change allows the gen_event at the core of lager to switch
    modes depending on the size of the gen_event's mailbox. It should
    provide better performance in the case of normal load, but it will also
    prevent unbounded mailbox growth if an overload occurs.
    
    The threshold at which the switch between async and sync is done is
    configured via the 'async_threshold' app env var.
Commits on Mar 7, 2013
  1. @Vagabond

    Merge pull request #115 from mworrell/mw-supervisor-name

    Vagabond authored
    Don't assume the supervisor is a registered process.
  2. @mworrell

    Replaced another use of element(2,Pid). Added some tests with somepid…

    mworrell authored
    … instead {local,name} as supervisor reference
  3. @Vagabond
  4. @mworrell
  5. @mworrell
Commits on Mar 5, 2013
  1. @ewanmellor

    Add an update to the global loglevel when a new handler is installed.

    ewanmellor authored
    This fixes a bug where messages were incorrectly discarded if the new
    handler is using log levels that are different from those in use by handlers
    that were set up at start-of-day.
  2. @ewanmellor

    Bring some duplicate code together around the loglevel handling.

    ewanmellor authored
    Add add_trace_to_loglevel_config and update_loglevel_config.  These two
    handle most of the updates to the loglevel config item, including the
    update of the overall logging mask.
    
    This makes minimum_loglevel private.
    
    This doesn't change any behavior -- it just a tidy-up.
Commits on Mar 2, 2013
  1. @Vagabond

    Merge pull request #112 from ewanmellor/non-atom-levels

    Vagabond authored
    Improve lager_console_backend to support non-atom output log levels.
Something went wrong with that request. Please try again.