tamouse mailing lists wrote in post #1107404:
> On Tue, Apr 30, 2013 at 12:54 PM, tamouse mailing lists
> <tamouse.lists / gmail.com> wrote:
>>> -and how to run an each loop to convert multiple strings
>> DEBUG 2013-04-23T17:27:50-05:00  "Dalli::Server#connect 127.0.0.1:11211"
>> specified by database.yml
>>
>> And you want to extract the time stamps from that and convert them to
>> DateTime objects. The following might be a way to do that:
>>
>> IO.foreach("./log/development.log") do |line|
>>   timestamp = DateTime.strptime(line.split[1]),'%FT%T%z')
>> end
>
> Opps, assume that log file didn't wrap and the DEBUG <timestamp> ...
> are all on one line.

thank you, this helps, it's close to what I'm looking for

-- 
Posted via http://www.ruby-forum.com/.