-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
millisecond time is not showing parsed json record. #1866
Comments
This is the error that I can see : Error: error: Input string was not in a correct format.. Member:. Line:0. Thread (managedID):1. Start Time:10/22/2023 1:38:27 AM. Time:10/22/2023 01:38:39.126 AM. File: . Exception: System.FormatException: Input string was not in a correct format. |
Hi @vgitk |
Hi Lior,
Thank you so much for your help!
…On Sun, Oct 22, 2023 at 2:29 AM Lior Banai ***@***.***> wrote:
Hi @vgitk <https://github.com/vgitk>
This should be relative simple fix. I'll check this and update you.
—
Reply to this email directly, view it on GitHub
<#1866 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQOZMYQWQUTOAHI4DZEJE43YAS4MLAVCNFSM6AAAAAA6KTWPASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGAYDQNZTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @vgitk {"instant":{"epochSecond":1685544384,"nanoOfSecond":611206994},"thread":"taskScheduler-3","level":"DEBUG","loggerName":"com.corp.cbu.cnc.nrfc.NRFCManagement","message":"NfInstanceId c1b51db4-7ac6-11ec-90d6-0242ac120003 present in list of configuredNfProfiles","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":54,"threadPriority":5,"messageTimestamp":"2023-05-31T14:46:24.611+0000"}
{"messageTimestamp":"2023-05-31T15:06:10.497Z","logLevel":"DEBUG","pid":1,"workerId":"master","message":"Fetching data from URI: http://occnp-2310-26507-gyltj-occnp-config-server:8000/topics/common.logging.pre for topic common.logging.pre with param false"} after small tweak and update in Analogy the format, I'm getting this: Is this what you need? |
Hi @LiorBanai, Thanks for your efforts, yes the change looks good to me. I assume the change can handle the date and time below formats: Sample 1 messageTimestamp : 2023-05-31T14:46:24.611+0000 basically in the final output I need the date and time below format: yyyy-MM-DDTHH:mm:ss.fff (milliseconds in three decimal digits) |
I have Released new version. You can test it and report back with any problems :) |
Awesome, thanks for the update!
I have checked it's working now.
- Vivek
…On Fri, Oct 27, 2023 at 5:23 AM Lior Banai ***@***.***> wrote:
Closed #1866
<#1866> as
completed.
—
Reply to this email directly, view it on GitHub
<#1866 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQOZMYVFE4MZQJNUQFKHE7LYBN4SXAVCNFSM6AAAAAA6KTWPASVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG44DSMZYGQ3TMMQ>
.
You are receiving this because you were mentioned.Message ID:
<Analogy-LogViewer/Analogy.LogViewer/issue/1866/issue_event/10789384762@
github.com>
|
Question
Shalom,
I've recently come across a fantastic log-parsing tool. I need to parse extensive .log files containing JSON records on each line.
I'm attempting to parse JSON files using the "JSON log parser." I've configured the dateTime format as "yyyy.MM.dd HH:mm:ss.fff," but I'm encountering an issue where the millisecond time isn't visible in the output.
Sample JSON record1 :
{"instant":{"epochSecond":1685544384,"nanoOfSecond":611206994},"thread":"taskScheduler-3","level":"DEBUG","loggerName":"com.corp.cbu.cnc.nrfc.NRFCManagement","message":"NfInstanceId c1b51db4-7ac6-11ec-90d6-0242ac120003 present in list of configuredNfProfiles","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":54,"threadPriority":5,"messageTimestamp":"2023-05-31T14:46:24.611+0000"}
`
Sample JSON record2 :
{"messageTimestamp":"2023-05-31T15:06:10.497Z","logLevel":"DEBUG","pid":1,"workerId":"master","message":"Fetching data from URI: http://occnp-2310-26507-gyltj-occnp-config-server:8000/topics/common.logging.pre for topic common.logging.pre with param false"}
DateTime format:
If you observe, the time format in both the sample records is slightly different.
Sample 1 messageTimestamp : 2023-05-31T14:46:24.611+0000
Sample 1 messageTimestamp : 2023-05-31T15:06:10.497Z
We receive both types of files for analysis, and we need to correlate the records between these two file formats. I would greatly appreciate it if you could recommend a method for extracting the date and time from both types of records and displaying them in the "yyyy.MM.dd HH:mm:ss.fff" format.
JSON configuration:
Here is the parsed record view, for some reason, it does not show the millisecond time.
Looking forward to hearing from you.
The text was updated successfully, but these errors were encountered: