Python Forum
Creating Dictionary form LOG /text file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating Dictionary form LOG /text file
#1
Hi All,
I am new to Python world and because of that I am not expert to do all the stuff. I am having some issue to convert below log file content to Dictionary format. Appreciate if someone from this forum please help me to do that. Thanks in Advance.

log file content like below. This log file will have several thousand record and each line will have more key.

002d2d62-4445-a06d.log:20190208 09:19:43.115 Debug Generic_OnWorkComplete: Message: {"sourceSysCode":"TP","sourceSysAcctNumber":"12234678901","transactions":[{"TransCode":"XXX","AcctTypeCode":"DD",,"BranchNumber":"000x","Desc":"02/05 FEDEXOFFICE 00 GGGG","ProductCode":"104"}]}
002d2d63-4445-a06d.log:20190208 09:19:52.538 Debug Generic_OnWorkComplete: Message: {"sourceSysCode":"TP","sourceSysAcctNumber":"22222222222","transactions":[{"TransCode":"YYY","AcctTypeCode":"DD","BranchNumber":"000y","Desc":"02/05 FEDEXOFFICE 00 YYYYY","ProductCode":"104"}]}
Reply


Messages In This Thread
Creating Dictionary form LOG /text file - by DG1234 - Feb-12-2019, 07:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help creating shell scrip for python file marciokoko 10 1,380 Sep-16-2023, 09:46 PM
Last Post: snippsat
  Form that puts diacritics on the words in the text Melcu54 13 1,500 Aug-22-2023, 07:07 AM
Last Post: Pedroski55
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,132 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  Creating csv files from Excel file azizrasul 40 5,713 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,694 Apr-13-2022, 06:02 AM
Last Post: Paqqno
Question How do I skipkeys on json file read to python dictionary? BrandonKastning 3 1,902 Mar-08-2022, 09:34 PM
Last Post: BrandonKastning
  trying to write a dictionary in a csv file CompleteNewb 13 6,634 Mar-04-2022, 04:43 AM
Last Post: deanhystad
  Converted Pipe Delimited text file to CSV file atomxkai 4 7,016 Feb-11-2022, 12:38 AM
Last Post: atomxkai
  Creating file with images BobSmoss 1 1,394 Jan-08-2022, 08:46 PM
Last Post: snippsat
  Class-Aggregation and creating a list/dictionary IoannisDem 1 1,927 Oct-03-2021, 05:16 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020