indexing description: "a trash appender, that fails from time to time. " 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_FAULTY_APPENDER inherit ELOG_STDOUT_APPENDER redefine do_append_string, make end EXCEPTIONS export {NONE} all end create make feature {NONE} -- Initialization make (new_name: STRING_8; synchronous: BOOLEAN) is -- create the appender do Precursor (new_name, synchronous) set_backup_appender (create {ELOG_TRASH_APPENDER}.make ("backup appender", True), True) create rand.make (1999) end feature {NONE} -- Implementation do_append_string (a_string: STRING) is -- append 'a_string' local r: REAL_64 do r := rand.next_real_64 if r < 0.333 then raise ("error appending on test appender") end io.putstring (a_string) end rand: ELOG_MERSENNE_TWISTER -- rng end