﻿<?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 » Help &amp; Support  » Use Pattern Parser with variable spaces count</title><generator>InstantForum 2017-1 Final</generator><description>LogViewPlus Support</description><link>https://www.logviewplus.com/forum/</link><webMaster>LogViewPlus Support</webMaster><lastBuildDate>Sun, 12 Apr 2026 02:52:17 GMT</lastBuildDate><ttl>20</ttl><item><title>Use Pattern Parser with variable spaces count</title><link>https://www.logviewplus.com/forum/post/1519</link><description>Hi there. I have a problem when parsing logfiles that contain lines with a variable count of spaces between words. Our logging framework inserts a variable count of spaces (not tabs) between the loglevel and the message like in this example:&lt;br/&gt;[code]&lt;br/&gt;2022.07.06-00:33:10.511 - warn:   A warning&lt;br/&gt;2022.07.06-00:33:10.623 - info:   Some info&lt;br/&gt;2022.07.06-00:33:12.743 - error:  This is an error&lt;br/&gt;[/code]&lt;br/&gt;The error line has fewer spaces than info or warn lines. The only pattern for the pattern parser that works for me is:&lt;br/&gt;[code]%d{yyyy.MM.dd-HH:mm:ss.fff} - %p:%m%n[/code]&lt;br/&gt;The only "problem" with this pattern is that the message is not trimmed meaning there are leading spaces. Is there a way to eliminate these leading spaces?</description><pubDate>Fri, 26 Aug 2022 10:47:52 GMT</pubDate><dc:creator>dawsonp</dc:creator></item><item><title>RE: Use Pattern Parser with variable spaces count</title><link>https://www.logviewplus.com/forum/post/1522</link><description>Thanks for pointing this out - that is something I noticed as well.&amp;nbsp; I will take a look before the next release.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;In general, the Parser Wizard is best suited to common use cases.&amp;nbsp; Some edge cases are not supported and I appreciate this can cause confusion.&amp;nbsp; Where possible we try to address these issues as they arise.&lt;br/&gt;&lt;br/&gt;Thanks again,&lt;br/&gt;&lt;br/&gt;Toby</description><pubDate>Fri, 26 Aug 2022 10:47:52 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item><item><title>RE: Use Pattern Parser with variable spaces count</title><link>https://www.logviewplus.com/forum/post/1521</link><description>Thank you!&amp;nbsp; This approach didn't cross my mind but it does help. It is also kind of difficult because the preview of the pattern wizards does not show the correct result:&lt;br/&gt;&lt;img src="../Uploads/Images/6d7ab020-891f-4129-926f-cffd.png" data-download-url="../Uploads/Images/61cc2976-d75b-479d-9952-e08e.png" id="if_insertedNode_1661510583649"&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Fri, 26 Aug 2022 10:43:06 GMT</pubDate><dc:creator>dawsonp</dc:creator></item><item><title>RE: Use Pattern Parser with variable spaces count</title><link>https://www.logviewplus.com/forum/post/1520</link><description>Hi,&lt;br/&gt;&lt;br/&gt;You can use a &lt;a href="https://www.logviewplus.com/docs/format_modifiers.html" id="if_insertedNode_1661509362039"&gt;format modifier&lt;/a&gt; to specify a minimum length of 7 on the priority field.&amp;nbsp; For example:&lt;br/&gt;[code]%d{yyyy.MM.dd-HH:mm:ss.fff} - %7p %m%n[/code]&lt;br/&gt;&lt;img src="../Uploads/Images/731c4908-3cf3-457f-9083-639f.png" id="if_insertedNode_1661509441959"&gt;&lt;br/&gt;&lt;br/&gt;Technically, this sets the priority to a value which includes the colon (such as "info:"), but LogViewPlus is still able to work out the correct log value as priority lookups are prefix based.&lt;br/&gt;&lt;br/&gt;&lt;img src="../Uploads/Images/bbeee4d7-8543-4d1f-9bcc-c0e1.png" id="if_insertedNode_1661509519798"&gt;&lt;br/&gt;&lt;br/&gt;Hope that helps,&lt;br/&gt;&lt;br/&gt;Toby</description><pubDate>Fri, 26 Aug 2022 10:27:17 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item></channel></rss>