[99s-extend] SOLVED -- Re: "access.log" for Cowboy

Ivan Uemlianin ivan at llaisdy.com
Wed May 15 14:43:28 CEST 2013


Thanks for this.  I've tried it.  It seems to be adding a trace to an 
already existing log file (which is already handling log messagse of a 
certain level).  e.g., it uses lager:trace not lager:trace_file.

I can't set it up so the trace file receives *only* trace messages.  I'l 
revert to the lager:trace_file call.

Best wishes

Ivan


Below is the config I've been using.

  {lager, [
           {handlers,
	   [
	    {lager_console_backend, info},
	    {lager_file_backend,
	     [
	      [{file, "log/error.log"}, {level, error},
                {size, 10485760},
	       {date, "$D0"}, {count, 5}],
	      [{file, "log/console.log"}, {level, info},
                {size, 10485760},
	       {date, "$D0"}, {count, 5}],
	      [{file, "log/access.log"},
                {size, 10485760},
	       {date, "$D0"}, {count, 5}]
	     ]}
	   ]},
	  {traces,
	   [
	    {{lager_file_backend, "log/access.log"},
              [{type, access}], debug}
	   ]}
          ]},


On 15/05/2013 12:56, Adam Rutkowski wrote:
>
> On 15 May 2013, at 13:40, Ivan Uemlianin wrote:
>
>> Thanks!  I got that working.
>>
>> When I start cowboy, I call
>>
>>   {ok, Trace} = lager:trace_file("path/to//access.log",
>>                                 [{type, access}]),
>>
>> When you say
>>
>>> Since 353dd21fde tracing is configurable.
>>
>> Do you mean the above could go in a .config file?  I haven't found anything to that effect.  I'll keep looking.
>
> See https://github.com/basho/lager/pull/134
>

-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     ivan at llaisdy.com
                      www.llaisdy.com
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================



More information about the Extend mailing list