Features
Support
Purchase
Documentation
Download
Login
Register
Login
Register
Home
»
LogViewPlus Support
»
Configuration & Customization
»
How to process optional columns in DsvParser
How to process optional columns in DsvParser
Post Reply
Like
0
How to process optional columns in DsvParser
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
soko
soko
posted Last Week
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 3,
Visits: 5
Hi,
I'm using the latest version of LogViewPlus and I'm having trouble finding the right settings for a DsvParser... or even maybe I need a different one.
Here's my log data:
12399|2025-10-16T02:26:17.4405537+00:00|INFO|37|Lifetime|Application is shutting down...
12401|2025-10-16T02:26:17.4581051+00:00|DEBUG|46|Host|Hosting stopping
12403|2025-10-16T02:26:17.4718160+00:00|DEBUG|40|Host|Hosting stopped
59|2025-10-16T02:26:41.4117132+00:00|INFO|2|VirusScannerService|VirusScannerService|TestIfItIsWorking|Starting Test...
61|2025-10-16T02:26:41.4138900+00:00|INFO|2|VirusScannerService|VirusScannerService|.ctor|Starting to initialise AMSI
I use this CsvParser:
%s|%d{yyyy-MM-ddT%H:mm:ss.fffffffzzzz}|%p|%t|%c|%m%n
as a workaround but the last two lines only show "VirusScannerService" as message and not the full text "VirusScannerService|TestIfItIsWorking|Starting Test..."
What I really want is to somehow tell the parser there are optional columns and the last column is the message.
So for the first three lines the parser of above works fine.
But for the last two it should be:
%s|%d{yyyy-MM-ddT%H:mm:ss.fffffffzzzz}|%p|%t|%c|%S{class}|%S{method}|%m%n
Is something like this possible? Or do I have to use a different parser when some columns are missing in some lines?
May I even need to use a
https://www.logviewplus.com/docs/custom_parsers.html
or a
https://www.logviewplus.com/docs/post_processors.html
At the moment I'm using this RegexParser as it gives me the optional columns in the message:
(?<sequence>\d+)\|(?<date>[0-9T:\.\+\-]+)\|(?<level>[A-Z]+)\|(?<thread>\d+)\|(?<logger>[^|]+)\|(?<message>.*)$
thanks
Soko
PS: There is also the possibility the message has multiple lines like shown below. But it seems this seems to work with my current RegExParser:
449|2025-10-16T11:20:51.1474936+00:00|DEBUG|11|Query|Compiling query expression:
'DbSet<Project>()
.Include(p => p.Users)
.ThenInclude(pu => pu.User)
.OrderBy(p => p.Code)'
451|2025-10-16T11:20:51.1548535+00:00|DEBUG|11|Query|Including navigation: 'Project.Users'.
Edited
Last Week by
soko
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
How to process optional columns in DsvParser
soko
-
Last Week
Hi Soko, That's a classic scenario when log formats vary slightly....
LogViewPlus Support
-
Last Week
Hi Toby, and thanks for the quick reply. I thought there must be an...
soko
-
Last Week
Hi Soko, Thanks for highlighting this. That appears to be an issue...
LogViewPlus Support
-
Last Week
Hi again. Perfect :D Now it works like expected. Thanks for the help.
soko
-
Last Week
Glad that helped - thanks for letting me know! I have made a note to...
LogViewPlus Support
-
Last Week
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search