<s> """<STR_LIT>""" <EOL> import logging <EOL> import os <EOL> import sys <EOL> from cloud_handler import CloudLoggingHandler <EOL> from cron_executor import Executor <EOL> PROJECT = '<STR_LIT>' <EOL> TOPIC = '<STR_LIT:test>' <EOL> script_path = os . path . abspath ( os . path . join ( os . getcwd ( ) , '<STR_LIT>' ) ) <EOL> sample_task = "<STR_LIT>" % script_path <EOL> root_logger = logging . getLogger ( '<STR_LIT>' ) <EOL> root_logger . setLevel ( logging . DEBUG ) <EOL> ch = logging . StreamHandler ( sys . stderr ) <EOL> ch . setLevel ( logging . DEBUG ) <EOL> formatter = logging . Formatter ( <EOL> '<STR_LIT>' ) <EOL> ch . setFormatter ( formatter ) <EOL> root_logger . addHandler ( ch ) <EOL> cloud_handler = CloudLoggingHandler ( on_gce = True , logname = "<STR_LIT>" ) <EOL> root_logger . addHandler ( cloud_handler ) <EOL> test_executor = Executor ( topic = TOPIC , project = PROJECT , task_cmd = sample_task , subname = '<STR_LIT>' ) <EOL> job_cloud_handler = CloudLoggingHandler ( on_gce = True , logname = test_executor . subname ) <EOL> test_executor . job_log . addHandler ( job_cloud_handler ) <EOL> test_executor . job_log . addHandler ( ch ) <EOL> test_executor . job_log . setLevel ( logging . DEBUG ) <EOL> test_executor . watch_topic ( ) </s>
