<html><head></head><body bgcolor="#FFFFFF"><div>Bryan,</div><div><br></div><div>You'll need to enable Lager's parse transform. The easiest way to do that is to add the {parse_transform, lager_transform} to your compile options in rebar.config.</div><div><br>Sean Cribbs</div><div><br>On Mar 31, 2012, at 3:13 AM, Bryan Hughes <<a href="mailto:bryan@wobblesoft.com">bryan@wobblesoft.com</a>> wrote:<br><br></div><div><span></span></div><blockquote type="cite"><div>
  

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  
  
    Hello,<br>
    <br>
    I have been using Lager for several months now to much success.  One
    thing that I have not figured out though is how to get our output to
    match that of what the limited documentation claims.  According to
    the blog post:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://basho.com/blog/technical/2011/07/20/Introducing-Lager-A-New-Logging-Framework-for-ErlangOTP/">http://basho.com/blog/technical/2011/07/20/Introducing-Lager-A-New-Logging-Framework-for-ErlangOTP/</a><br>
    <br>
    It states:<br>
    <br>
    <meta charset="utf-8">
    <meta charset="utf-8">
    <p style="margin-top: 0px; margin-right: 0px; margin-bottom: 25px;
      margin-left: 0px; padding-top: 0px; padding-right: 0px;
      padding-bottom: 0px; padding-left: 0px; border-top-width: 0px;
      border-right-width: 0px; border-bottom-width: 0px;
      border-left-width: 0px; border-style: initial; border-color:
      initial; border-image: initial; outline-width: 0px; outline-style:
      initial; outline-color: initial; font-size: 14px; vertical-align:
      baseline; background-image: initial; background-attachment:
      initial; background-origin: initial; background-clip: initial;
      background-color: rgb(250, 250, 250); font-family:
      'AvantGardeGothicITCW01B 731069', helvetica, arial, sans-serif;
      font-weight: normal; line-height: 22px; color: rgb(0, 0, 0);
      font-style: normal; font-variant: normal; letter-spacing: normal;
      orphans: 2; text-align: -webkit-auto; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; background-position: initial
      initial; background-repeat: initial initial; ">Now, those were
      messages coming out of error_logger, which is fine for legacy or
      library code, but Lager also has its own logging API that you can
      use. It's actually implemented via a parse_transform so that Lager
      can capture the current module, function, line number and pid for
      inclusion in the log message. All this is done automatically, and
      the logging call in the code looks like this:</p>
    <div class="highlight" style="margin-top: 0px; margin-right: 0px;
      margin-bottom: 1em; margin-left: 0px; padding-top: 0.25em;
      padding-right: 0.5em; padding-bottom: 0.25em; padding-left: 0.5em;
      border-top-width: 0px; border-right-width: 0px;
      border-bottom-width: 0px; border-left-width: 0px; border-style:
      initial; border-color: initial; border-image: initial;
      outline-width: 0px; outline-style: initial; outline-color:
      initial; font-size: 14px; vertical-align: baseline;
      background-image: initial; background-attachment: initial;
      background-origin: initial; background-clip: initial;
      background-color: rgb(250, 250, 250); overflow-x: auto; color:
      rgb(0, 0, 0); font-family: 'AvantGardeGothicITCW01B 731069',
      helvetica, arial, sans-serif; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; background-position: initial
      initial; background-repeat: initial initial; ">
      <pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "><span class="nn" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-imag
e: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(85, 85, 85); background-position: initial initial; background-repeat: initial initial; ">lager</span><span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: in
itial initial; background-repeat: initial initial; ">:</span><span class="n" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; ">error</span><span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; bord
er-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; ">(</span><span class="s" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; backg
round-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">"oh no!"</span><span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; ">)</span>
<span class="nn" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(85, 85, 85); background-position: initial initial; background-repeat: initial initial; ">lager</span><span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: in
itial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; ">:</span><span class="n" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background
-position: initial initial; background-repeat: initial initial; ">warning</span><span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; ">(</span><span class="s" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-w
idth: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">"</span><span class="si" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin:
 initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">~s</span><span class="s" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">, </span><span class="si" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px;
 padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">~s</span><span class="s" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initi
al; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; "> and </span><span class="si" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial
; ">~s</span><span class="s" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(221, 17, 68); background-position: initial initial; background-repeat: initial initial; ">, oh my!"</span></pre></div></div><div><span>_______________________________________________</span><br><span>riak-users mailing list</span><br><span><a href="mailto:riak-users@lists.basho.com">riak-users@lists.basho.com</a></span><br><span><a href="http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com">http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com</a></span><br></div></blockquote></body></html>