#NEWLINE# def default_body_parser( event , text ) : #NEWLINE# #INDENT# '\n    Default parser to attempt to use to parser body text for the event (i.e. after\n    the "header" common to all events has been parsed). This assumes that the body is\n    a whitespace-separated list of key=value pairs. The parser will attempt to convert\n    the value into a numeric type, and failing that, keep it as string.\n\n    ' #NEWLINE# parts = [ e . rsplit ( ' ' , 1 ) for e in text . strip ( ) . split ( '=' ) ] #NEWLINE# parts = [ p . strip ( ) for p in chain . from_iterable ( parts ) ] #NEWLINE# if ( not ( len ( parts ) % 2 ) ) : #NEWLINE# #INDENT# i = iter ( parts ) #NEWLINE# for ( k , v ) in zip ( i , i ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# v = int ( event ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# event . fields [ k ] = v