Last active
September 9, 2022 12:22
-
-
Save Leovaldez42/50508a03597a08dfb53e3f925b781a0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
file_name = "a.json" | |
with open(file_name) as f1: | |
lines = f1.readlines() | |
# Removing Event, Event Number and the Number at the end, then parsing line as a json | |
lines = [json.loads(" ".join(line.split(" ")[2:-1])) for line in lines] | |
print ([line["log"] for line in lines]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EVENTS 16623232889 {"log": "Hello I am someone", "stream": "a", "cluster-name": "432"} 3232
EVENTS 16623232890 {"log": "I am doing something.", "stream": "b", "cluster-name": "432"} 2321
EVENTS 16623232891 {"log": "bbye", "stream": "c", "cluster-name": "432"} 231231
EVENTS 16623232892 {"log": "bbyee", "stream": "d", "cluster-name": "432"} 23123212