<HTML><BODY>Thanks!<br>This works!<br>Big thanks!<br><br><br>Среда, 10 июня 2015, 6:12 UTC от Chris Schafer <chrisp.schafer@gmail.com>:<br>
<blockquote style="margin: 10px; padding: 0px 0px 0px 10px; border-left-color: rgb(8, 87, 166); border-left-width: 1px; border-left-style: solid;">
        <div>
        



    











        
        


        
        
        

        

        
        

        

        
        



<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base href="https://e.mail.ru/" target="_self">
                
            <div id="style_14339167380000000801_BODY">You are almost doing it right, just add a ] at the end - you are parsing TO the ], not including it. <br>rule=:[%date:date-iso% %time:time-24hr% %microsec:number% %timezone:char-to:]%]<br><div>On Tue, Jun 9, 2015 at 11:10 PM Фадеев Виталий Львович <<a href="//e.mail.ru/compose/?mailto=mailto%3afvl@mail.ru" target="_blank">fvl@mail.ru</a>> wrote:<br><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
<div><p>Hi!<br>I want to log all from apache. I use custom log in apache that looks like:<br><br>[2015-06-09 18:27:07 197 NOVT] [192.168.1.67] [192.168.1.67] [192.168.1.254] [818] [/var/www/host/css/button.css] [192.168.1.67] [HTTP/1.1] [1] [-] [GET] [5064] [?v=0] [GET /css/button.css?v=0 HTTP/1.1] [-] [200] [200] [0] [/css/button.css] [hostname.domain] [hostname.domain] [+] [1540] [1138] ["<a href="http://hostname.domain/index.html" target="_blank">http://hostname.domain/index.html</a>"] ["Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0"]<br><br>For example, i create test.log that contains:<br>[2015-06-09 16:47:34 830 NOVT]<br><br>and test.rb:<br>rule=:[%date:date-iso% %time:time-24hr% %microsec:number% %timezone:char-to:]%<br><br>If i try i get:<br>$ lognormalizer -r test.rb -e json  < test.log <br>{ "originalmsg": "[2015-06-09 16:47:34 830 NOVT]", "unparsed-data": "]" }<br><br>How to parse data between [ and ] ?<br></p></div>
_______________________________________________<br>
Lognorm mailing list<br>
<a href="//e.mail.ru/compose/?mailto=mailto%3aLognorm@lists.adiscon.com" target="_blank">Lognorm@lists.adiscon.com</a><br>
<a href="http://lists.adiscon.net/mailman/listinfo/lognorm" target="_blank" rel="noreferrer">http://lists.adiscon.net/mailman/listinfo/lognorm</a><br>
</blockquote></div>
</div>
            
        
                <base href="https://e.mail.ru/" target="_self">
        </div>

        
</div>


</div>
</blockquote>
<br></BODY></HTML>