File tree Expand file tree Collapse file tree
converter/converter/cisu/resources_info Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,3 +97,26 @@ def enrich_rs_ri_with_rs_srs(
9797def get_latest_state (states : list [dict ]) -> dict :
9898 """Return the state with the most recent datetime from a list of states."""
9999 return sorted (states , key = lambda x : x .get ("datetime" , "" ))[- 1 ]
100+
101+
102+ def log_cisu_to_rs_converted_messages_ids (
103+ original_message : dict , rs_ri : dict | None , rs_sr_list : list [dict ]
104+ ) -> None :
105+ if rs_ri is None and len (rs_sr_list ) == 0 :
106+ logger .info (
107+ f"No RS message produced when converting RC-RI with distributionId { original_message .get ('distributionID' )} ."
108+ )
109+
110+ else :
111+ log_message = f"Converted RC-RI with distributionID { original_message .get ('distributionID' )} into"
112+
113+ if rs_ri is not None :
114+ log_message += f" RS-RI { rs_ri .get ('distributionID' )} "
115+
116+ if rs_sr_list :
117+ if rs_ri is not None :
118+ log_message += " and"
119+ rs_sr_ids = [rs_sr .get ("distributionID" ) for rs_sr in rs_sr_list ]
120+ log_message += f" { len (rs_sr_list )} RS-SR(s) { rs_sr_ids } "
121+
122+ logger .info (log_message )
You can’t perform that action at this time.
0 commit comments