indexing description: "This class generates a Common Base Event that correlates. " library: "elogger" copyright: "Copyright (c) 2006, AXA Rosenberg, and others (see copyright.txt)" author: "Ulrich Weiss, and others" license: "Eiffel Forum License v2 (see forum.txt)" date: "$Date: $" revision: "$Revision: $" archive: "$Archive: $" class ELOG_TEST_CORRELATING_CBE inherit ELOG_SEVERITY_CONSTANTS create make feature {NONE} -- Initialization make is -- creation procedure local h: ELOG_HIERARCHY cbe: ELOG_COMMON_BASE_EVENT a: ELOG_FILE_APPENDER ae, ae2: ELOG_CBE_ASSOCIATED_EVENT asseng1, asseng2: ELOG_CBE_ASSOCIATION_ENGINE compfact: ELOG_CBE_COMPONENT_FACTORY l: ELOG_CBE_XML_LAYOUT do create h.make (Information_severity) create a.make ("cbe_correlation.log", False, True) create l.make create asseng1.make ("ass_eng1", "STRING", "i0000000000000000000000000000043") create asseng2.make ("ass_eng2", "STRING", "i0000000000000000000000000000044") l.add_association_engine (asseng1) l.add_association_engine (asseng2) a.set_layout (l) h.logger ("cbefile").add_appender (a) a.write_header create cbe.make ("message 1") create compfact cbe.set_source_component (compfact.new_component_with_context ("My application")) create ae.make_with_association_engine_info (asseng1) create ae2.make_with_association_engine_info (asseng2) cbe.add_associated_event (ae) h.logger ("cbefile").log_warning (cbe) cbe.set_message ("message 2") h.logger ("cbefile").log_warning (cbe) cbe.set_message ("message 2") cbe.remove_associated_event (ae) cbe.add_associated_event (ae2) h.logger ("cbefile").log_warning (cbe) cbe.set_message ("message 1 corr2") h.logger ("cbefile").log_warning (cbe) cbe.remove_associated_event (ae2) cbe.set_message ("message 2 corr2") h.logger ("cbefile").log_warning (cbe) cbe.set_message ("message 3 uncorrelated") h.logger ("cbefile").log_warning (cbe) a.write_footer h.close_all end end