Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Apr 24, 2013
  1. @Vagabond

    Merge pull request #139 from basho/adt-avoid-console-io-hang

    Vagabond committed
    Disable console backend if oldshell is used
  2. @Vagabond

    Rework the 'old shell' warning, and some related work

    Vagabond committed
    Add ability for handlers to 'fatally' fail, so they won't attempt to
    reinstall themselves later.
    Also fix an issue with the INT_LOG macro not doing the right thing when
    only the lager_throttle_backend was installed.
  3. @slfritchie @Vagabond

    Disable I/O to the console if the old-style Erlang console is used

    slfritchie committed with Vagabond
    There's a nasty problem with the Erlang VM + lager when the old-style
    Erlang console is used.  You can use the "-oldshell" flag to explicitly
    get the old-style shell.  However, if the Erlang VM is started when
    *not* associated with a pseudo-tty, the VM will silently use the
    old-style shell (because the new-style shell requires a pty to
    support command line editing, etc.).  The most common way of starting
    the Erlang VM without a pty is to start it via a non-interactive
    SSH session.
    This patch is opinionated in what to do in the case when the old-
    style shell is detected.  My opinion is:
    1. Shout loudly to the console log (in a separate Erlang process, so
       that the main lager event handler proc won't be blocked by any
       problems with the old-style console).  It's almost certainly
       likely that you really don't want to run Erlang with the old-style
       shell.  But many sysadmins don't look closely at their systems'
       log files, so (for example) shouting the same message 10x in a row
       is legit.  Reviewers: YMMV.
    2. Set a SASL alarm.  Again, many sysadmins' are bad at looking at
       log messages.  Setting a SASL alarm is another method to try to
       get their attention.
    To test, create a test script called `/tmp/`, changing the
    `-pz` parameter to point to the correct place for lager's `ebin`
        erl -pz /Users/fritchie/b/src/lager/ebin -eval '{application:start(sasl), lager_console_backend:init([error, true]), timer:sleep(5*1000), io:format("\n\nInfo: ~p\n\n", [{{alarms, alarm_handler:get_alarms()}, {user_drv, whereis(user_drv)}}]), erlang:halt()}.'
    Then run it twice, using the following:
        First time: ssh -t localhost sh /tmp/
        Second time: ssh localhost sh /tmp/
    The last lines of the first time should look like:
        Info: {{alarms,[]},{user_drv,<0.22.0>}}
    The last lines of the second time should look like:
        Info: {{alarms,
                        "WARNING: old-style console is in use, so lager_console_backend log output to the console is disabled.  Restart the VM on a pseudo-tty to ensure use of the new-style VM console."}]},
Commits on Apr 22, 2013
  1. @Vagabond
  2. @Vagabond
  3. @srstrong @Vagabond
Commits on Apr 19, 2013
  1. @Vagabond
  2. @Vagabond
  3. @Vagabond

    Pin the goldrush dep to a SHA

    Vagabond committed
  4. @Vagabond
  5. @Vagabond

    Merge branch 'dz-event-stream-processing' of git://…

    Vagabond committed
    …/lager into DeadZen-dz-event-stream-processing
Commits on Apr 15, 2013
  1. @Vagabond

    Merge pull request #129 from basho/adt-unicode-fix

    Vagabond committed
    Support writing unicode to files, thanks @jacktang
  2. @Vagabond
  3. @Vagabond
  4. @Vagabond

    Merge pull request #130 from gomoripeti/pgö-rotate-check-interval-test

    Vagabond committed
    test internal log rotation when check_interval > 0
Commits on Apr 12, 2013
  1. @Vagabond

    Add a latin-1 test

    Vagabond committed
Commits on Apr 9, 2013
  1. Fix typespecs for a clean dialyzer run

    gsmith committed
    Fix typespec of lager_file_backend:init() and lager_msg record
  2. @DeadZen

    Implement event stream processing

    DeadZen committed
    Adds transparent event stream processing and statistics.
    A new 3-tuple trace is introduced as `{Key, Op, Value}`, but
    for backwards compatibility `{Key, Val}` implies `=` for `Op`
    and `{Key, '*'}` remains as is in the case of wildcards.
    A simplified query tree module is generated which reduces
    redundant selection conditions to minimize filtering overhead.
Commits on Apr 5, 2013
  1. @gomoripeti
Commits on Apr 4, 2013
  1. @Vagabond

    Merge pull request #128 from gomoripeti/pgö-rotate-check-interval

    Vagabond committed
    fix internal log rotation when check_interval > 0
Commits on Apr 3, 2013
  1. @gomoripeti
  2. @Vagabond
Commits on Mar 22, 2013
  1. @Vagabond

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

    Vagabond committed
    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 committed
    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 committed
    Allow storage of persistant per-process lager metadata
Commits on Mar 16, 2013
  1. @Vagabond

    Improve the performance of the file backend

    Vagabond committed
    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
    * 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
    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 committed
    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

    Correct some dialyzer warnings

    Vagabond committed
  3. @Vagabond

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

    Vagabond committed
    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 committed
    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 committed
    Switch between gen_event notify/sync_notify based on message queue length
  2. @Vagabond

    Add a test for async_threshold

    Vagabond committed
Something went wrong with that request. Please try again.