Created
January 8, 2021 18:19
-
-
Save charsyam/99a936c9c8a39379c75224b0f1f93e31 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
from thrift.protocol import TBinaryProtocol | |
from thrift.transport import TTransport | |
from schemas.singer.ttypes import LogMessage | |
fstream = open("./tf.log","rb") | |
transport = TTransport.TFramedTransport(TTransport.TFileObjectTransport(fstream)) | |
protocol = TBinaryProtocol.TBinaryProtocol(transport) | |
transport.open() | |
while True: | |
log = LogMessage() | |
log.read(protocol) | |
print(log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment