Features
Support
Purchase
Documentation
Download
Login
Register
Login
Register
Home
»
LogViewPlus Support
»
Configuration & Customization
»
Current year appended to result from date/time parser
Current year appended to result from date/time parser
Post Reply
Like
5
Current year appended to result from date/time parser
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
mansai
mansai
posted 5 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 2,
Visits: 36
Hi,
New user here, and trying to parse a text log file, but when I select a timestamp that has %d{MMM dd %H:mm:ss} it appends the current year in the resulting column. The log file was from a different year.
Here is an example line:
Flow;Wed Oct 31 10:37:29 GMT+10:00 2018;URL Proxy Settings: Proxy: Port: has AuthProvider true
The
%d{MMM dd %H:mm:ss} results in
31 Oct 2020
I have tried different date specifiers as listed in
https://www.logviewplus.com/docs/date_specifier.html
but always end up with the current year.
Any advice?
Regards
Colin Rock
Edited
5 Years Ago by
mansai
Reply
Like
5
LogViewPlus Support
LogViewPlus Support
posted 5 Years Ago
ANSWER
Post Details
Share Post
Group: Moderators
Posts: 1.2K,
Visits: 4.3K
Hi Colin,
Thanks for bringing this issue to my attention.
That is a very tricky date to parse. In particular, LogViewPlus is going to struggle with having the timezone twice as this is not supported by our underlying technology (.Net). The placement of the time zones is also preventing us from parsing the year. Because we don't have access to the year, it is confusing to parse Wed Oct 31. Not every Oct 31st is also a Wednesday.
Normally, I would recommend applying a time offset after parse, but this feature is not built to offset years. I will revisit this to allow for more coarse changes.
The only solution I can think of at the moment is to write a custom parser or scrub the data. Please see:
https://www.logviewplus.com/docs/custom_parsers.html
https://www.logviewplus.com/docs/open_commands.html
If you could convert " GMT+10:00" to "+10:00", then the date could be parsed with: ddd MMM dd HH:mm:sszzzz yyyy
There is another issue here. All dates must have a year and if a year is not provided the current year is assumed. This is why the format %d{MMM dd %H:mm:ss} resolves to the year 2020. Oct 2020 doesn't make sense for a log file in Feb 2020. A better assumption would be Oct 2019. I will make this change for the next release. However, since your year is actually 2018, it will not be much benefit here.
Hope that helps,
Toby
Reply
Like
6
mansai
mansai
posted 5 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 2,
Visits: 36
Hi Toby,
Thanks for the prompt response and explanation.
The same logs from recent do have a different date and time format which works fine. So no major requirement to have it fixed.
Just trying to learn the product.
Many thanks and feel free to close this off.
Regards
Colin Rock
Reply
Like
6
LogViewPlus Support
LogViewPlus Support
posted 5 Years Ago
ANSWER
Post Details
Share Post
Group: Moderators
Posts: 1.2K,
Visits: 4.3K
Thanks for the update Colin.
For the next release of LogViewPlus, we will assume log entry dates without a year to be in the past as discussed above. I have also enhanced the Time Offset dialog to allow you to set an arbitrary date. This will allow you to work around the parser limitations going forward.
Still a work in progress, but something like:
Thanks for bringing this issue to my attention!
Toby
Reply
Like
7
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
5
Similar Topics
Post Quoted Reply
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search