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 4 Months Ago
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
4 Months Ago by
soko
Reply
Like
0
Replies
soko
soko
posted 4 Months Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 3,
Visits: 5
Hi Toby,
and thanks for the quick reply. I thought there must be an "out of the box" way for this scenario
But the output of your solution is not completely correct. For the first three lines the message is shown in the "class" column. But the class & method column should be empty for those and i.e. "Application is shutting down..." should be in the Message column.
Is that possible?
thanks again! Soko
Edited
4 Months Ago by
soko
Reply
Like
0
LogViewPlus Support
LogViewPlus Support
posted 4 Months Ago
ANSWER
Post Details
Share Post
Group: Moderators
Posts: 1.3K,
Visits: 4.5K
Hi Soko,
Thanks for highlighting this. That appears to be an issue with the DSV parser which I will need to investigate.
In the meantime, try using the PatternParser instead. Your configuration can remain the same - just switch the parser:
Thanks again,
Toby
Reply
Like
1
soko
soko
posted 4 Months Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 3,
Visits: 5
Hi again. Perfect
Now it works like expected. Thanks for the help.
Reply
Like
0
LogViewPlus Support
LogViewPlus Support
posted 4 Months Ago
ANSWER
Post Details
Share Post
Group: Moderators
Posts: 1.3K,
Visits: 4.5K
Glad that helped - thanks for letting me know!
I have made a note to investigate the DsvParser issue before the next release. Thanks for spotting that one.
Toby
Reply
Like
1
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
-
4 Months Ago
Hi Soko, That's a classic scenario when log formats vary slightly....
LogViewPlus Support
-
4 Months Ago
Hi Toby, and thanks for the quick reply. I thought there must be an...
soko
-
4 Months Ago
Hi Soko, Thanks for highlighting this. That appears to be an issue...
LogViewPlus Support
-
4 Months Ago
Hi again. Perfect :D Now it works like expected. Thanks for the help.
soko
-
4 Months Ago
Glad that helped - thanks for letting me know! I have made a note to...
LogViewPlus Support
-
4 Months Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search