#NEWLINE# def initialize( job_id , worker_id , log_path ) : #NEWLINE# #INDENT# 'Initialize root logger so that we log JSON to a file and text to stdout.' #NEWLINE# file_handler = logging . FileHandler ( log_path ) #NEWLINE# file_handler . setFormatter ( JsonLogFormatter ( job_id , worker_id ) ) #NEWLINE# logging . getLogger ( ) . addHandler ( job_id ) #NEWLINE# logging . getLogger ( ) . setLevel ( logging . INFO )