def get_history_entry_record(endianess, hist_date_time_flag, tm_format, event_number_flag, hist_seq_nbr_flag, data):
rcd = {}<EOL>if hist_date_time_flag:<EOL><INDENT>tmstmp = format_ltime(endianess, tm_format, data[<NUM_LIT:0>:LTIME_LENGTH.get(tm_format)])<EOL>if tmstmp:<EOL><INDENT>rcd['<STR_LIT>'] = tmstmp<EOL><DEDENT>data = data[LTIME_LENGTH.get(tm_format):]<EOL><DEDENT>if event_number_flag:<EOL><INDENT>rcd['<STR_LIT>'] = struct.unpack(endianess + '<STR_LIT:H>', data[:<NUM_LIT:2>])[<NUM_LIT:0>]<EOL>data = data[<NUM_LIT:2>:]<EOL><DEDENT>if hist_seq_nbr_flag:<EOL><INDENT>rcd['<STR_LIT>'] = struct.unpack(endianess + '<STR_LIT:H>', data[:<NUM_LIT:2>])[<NUM_LIT:0>]<EOL>data = data[<NUM_LIT:2>:]<EOL><DEDENT>rcd['<STR_LIT>'] = struct.unpack(endianess + '<STR_LIT:H>', data[:<NUM_LIT:2>])[<NUM_LIT:0>]<EOL>rcd['<STR_LIT>'], rcd['<STR_LIT>'] = get_table_idbb_field(endianess, data[<NUM_LIT:2>:<NUM_LIT:4>])[:<NUM_LIT:2>]<EOL>rcd['<STR_LIT>'] = data[<NUM_LIT:4>:]<EOL>return rcd<EOL>
Return data formatted into a log entry.

:param str endianess: The endianess to use when packing values ('>' or '<')
:param bool hist_date_time_flag: Whether or not a time stamp is included.
:param int tm_format: The format that the data is packed in, this typically
  corresponds with the value in the GEN_CONFIG_TBL (table #0) (1 <= tm_format <= 4)
:param bool event_number_flag: Whether or not an event number is included.
:param bool hist_seq_nbr_flag: Whether or not an history sequence number
  is included.
:param str data: The packed and machine-formatted data to parse
:rtype: dict