<s> from __future__ import ( absolute_import , division , generators , nested_scopes , print_function , <EOL> unicode_literals , with_statement ) <EOL> from collections import namedtuple <EOL> from pants . reporting . report import Report <EOL> class Reporter ( object ) : <EOL> """<STR_LIT>""" <EOL> Settings = namedtuple ( '<STR_LIT>' , [ '<STR_LIT>' ] ) <EOL> def __init__ ( self , run_tracker , settings ) : <EOL> self . run_tracker = run_tracker <EOL> self . settings = settings <EOL> def open ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def close ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def start_workunit ( self , workunit ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def end_workunit ( self , workunit ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def handle_log ( self , workunit , level , * msg_elements ) : <EOL> """<STR_LIT>""" <EOL> if level <= self . level_for_workunit ( workunit , self . settings . log_level ) : <EOL> self . do_handle_log ( workunit , level , * msg_elements ) <EOL> def do_handle_log ( self , workunit , level , * msg_elements ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def handle_output ( self , workunit , label , s ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def is_under_main_root ( self , workunit ) : <EOL> """<STR_LIT>""" <EOL> return self . run_tracker . is_under_main_root ( workunit ) <EOL> def level_for_workunit ( self , workunit , default_level ) : <EOL> if workunit . log_config and workunit . log_config . level : <EOL> if workunit . log_config . level == '<STR_LIT>' : <EOL> return Report . WARN <EOL> if workunit . log_config . level == '<STR_LIT>' : <EOL> return Report . DEBUG <EOL> if workunit . log_config . level == '<STR_LIT:info>' : <EOL> return Report . INFO <EOL> return default_level <EOL> def use_color_for_workunit ( self , workunit , default_use_colors ) : <EOL> if workunit . log_config and workunit . log_config . colors is not None : <EOL> return workunit . log_config . colors <EOL> return default_use_colors </s>
