﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>LogViewPlus Support » LogViewPlus Support » Configuration &amp; Customization  » Parsing MySql Log File</title><generator>InstantForum 2017-1 Final</generator><description>LogViewPlus Support</description><link>https://www.logviewplus.com/forum/</link><webMaster>LogViewPlus Support</webMaster><lastBuildDate>Sat, 11 Apr 2026 06:06:02 GMT</lastBuildDate><ttl>20</ttl><item><title>Parsing MySql Log File</title><link>https://www.logviewplus.com/forum/post/188</link><description>I am having trouble parsing a MySQL log file.&amp;nbsp; A sample log entry might look like:&lt;br/&gt;&lt;br/&gt;# Time: 2019-06-01T07:35:37.564219Z&lt;br/&gt;#&amp;nbsp;&lt;a href="mailto:User@Host"&gt;User@Host&lt;/a&gt;: user[user] @ localhost []&amp;nbsp; Id: 70218&lt;br/&gt;# Query_time: 0.026542&amp;nbsp; Lock_time: 0.000222 Rows_sent: 1&amp;nbsp; Rows_examined: 19608&lt;br/&gt;select * from MyTable&lt;br/&gt;&lt;br/&gt;How can I configure LogViewPlus to parse this file?&amp;nbsp; </description><pubDate>Mon, 03 Jun 2019 18:16:23 GMT</pubDate><dc:creator>Email User</dc:creator></item><item><title>RE: Parsing MySql Log File</title><link>https://www.logviewplus.com/forum/post/191</link><description>Nice one Jon - thanks for the update!&lt;br/&gt;&lt;br/&gt;Toby </description><pubDate>Mon, 03 Jun 2019 18:16:23 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item><item><title>RE: Parsing MySql Log File</title><link>https://www.logviewplus.com/forum/post/190</link><description>&lt;blockquote data-id="189" class="if-quote-wrapper" unselectable="on"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="189" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="189" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="189" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;LogViewPlus Support - 6/2/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-189"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi,&lt;br/&gt;&lt;br/&gt;So, this is not an easy file to parse as the ParserWizard cannot handle the new line very well.  However, you can parse the file by configuring it manually.  I am using the PatternParser with the configuration:&lt;br/&gt;&lt;br/&gt;# Time: %d{yyyy-MM-ddTHH:mm:ss.ffffffZ}\n# User@Host: %S{User Info}\n# Query_time: %S{Query Time}\n%m%n&lt;br/&gt;&lt;br/&gt;&lt;img src="../Uploads/Images/2e14ef25-759d-4eea-8013-96cd.png" id="if_insertedNode_1559481206908"&gt;&lt;br/&gt;&lt;br/&gt;If you wanted, you can probably break out some of the User Info and Query Time fields – but be aware that LogViewPlus cannot process optional fields (data that is written &lt;i&gt;sometimes&lt;/i&gt;).&lt;br/&gt;&lt;br/&gt;Hope that helps.  Let me know if you continue to have problems.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Toby&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="189"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;This is very useful. It works perfectly with the PatternParser. I have tweaked it slightly to get further insight into the fields reported in the file. Very intuitive to use...&lt;br/&gt;&lt;br/&gt;# Time: %d{yyyy-MM-ddTHH:mm:ss.ffffffZ}\n# User@Host: %S{User Info}\n# Query_time: %s{Query Time}  Lock_time: %s{Lock Time} Rows_sent: %s{Rows sent}  Rows_examined: %s{Rows examined}\n%m%n&lt;br/&gt;&lt;br/&gt;Similarly, I have created another parser for the normal MYSQL log&lt;br/&gt;&lt;br/&gt;%d{yyyy-MM-ddTHH:mm:ss.ffffffZ}\t %s{order} %s{command}\t%S{query}%n&lt;br/&gt;&lt;br/&gt;Using them both together in the combined view is turning out super powerful in order to find out performance issues in my backend... I cannot thank Toby enough.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 03 Jun 2019 15:45:49 GMT</pubDate><dc:creator>Jon Mikel</dc:creator></item><item><title>RE: Parsing MySql Log File</title><link>https://www.logviewplus.com/forum/post/189</link><description>Hi,&lt;br/&gt;&lt;br/&gt;So, this is not an easy file to parse as the ParserWizard cannot handle the new line very well.  However, you can parse the file by configuring it manually.  I am using the PatternParser with the configuration:&lt;br/&gt;&lt;br/&gt;# Time: %d{yyyy-MM-ddTHH:mm:ss.ffffffZ}\n# User@Host: %S{User Info}\n# Query_time: %S{Query Time}\n%m%n&lt;br/&gt;&lt;br/&gt;&lt;img src="../Uploads/Images/2e14ef25-759d-4eea-8013-96cd.png" id="if_insertedNode_1559481206908"&gt;&lt;br/&gt;&lt;br/&gt;If you wanted, you can probably break out some of the User Info and Query Time fields – but be aware that LogViewPlus cannot process optional fields (data that is written &lt;i&gt;sometimes&lt;/i&gt;).&lt;br/&gt;&lt;br/&gt;Hope that helps.  Let me know if you continue to have problems.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Toby&lt;br/&gt;</description><pubDate>Sun, 02 Jun 2019 13:17:25 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item></channel></rss>