def google2_log_prefix(level, timestamp=None, file_and_line=None):
<EOL>global _level_names<EOL>now = timestamp or _time.time()<EOL>now_tuple = _time.localtime(now)<EOL>now_microsecond = int(<NUM_LIT> * (now % <NUM_LIT:1.0>))<EOL>(filename, line) = file_and_line or _GetFileAndLine()<EOL>basename = _os.path.basename(filename)<EOL>severity = '<STR_LIT:I>'<EOL>if level in _level_names:<EOL><INDENT>severity = _level_names[level][<NUM_LIT:0>]<EOL><DEDENT>s = '<STR_LIT>' % (<EOL>severity,<EOL>now_tuple[<NUM_LIT:1>],  <EOL>now_tuple[<NUM_LIT:2>],  <EOL>now_tuple[<NUM_LIT:3>],  <EOL>now_tuple[<NUM_LIT:4>],  <EOL>now_tuple[<NUM_LIT:5>],  <EOL>now_microsecond,<EOL>_get_thread_id(),<EOL>basename,<EOL>line<EOL>)<EOL>return s<EOL>
Assemble a logline prefix using the google2 format.