Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:
indexing description: "Logging appender that writes to a file." project: "Project Goanna <http://sourceforge.net/projects/goanna>" library: "log4e" date: "$Date$" revision: "$Revision$" author: "Glenn Maughan <glennmaughan@goanna.info>" copyright: "Copyright (c) 2002 Glenn Maughan" license: "Eiffel Forum License v1 (see forum.txt)." class interface L4E_FILE_APPENDER create make (new_name: STRING; appending: BOOLEAN) -- Create a new file appender on the file -- with 'name'. ensure l4e_stream_open: stream.is_open_write feature -- Removal dispose -- Close this appender when garbage collected. Perform -- minimal operations to release resources. Do not call -- other object as they may have been garbage collected. feature -- Basic Operations close -- Release any resources for this appender. ensure -- from L4E_APPENDER closed: not is_open do_append (event: L4E_EVENT) -- Log event on this appender. require -- from L4E_APPENDER event_exists: event /= void is_open: is_open feature -- Initialisation make (new_name: STRING; appending: BOOLEAN) -- Create a new file appender on the file -- with 'name'. ensure l4e_stream_open: stream.is_open_write feature -- Status Report append_mode: BOOLEAN -- Append to file or create new file? is_open: BOOLEAN -- Is the appender open for appending? -- (from L4E_APPENDER) layout: L4E_LAYOUT -- Layout used to format events for this appender. May be Void -- if no layout is used. -- (from L4E_APPENDER) name: STRING -- Name of this appender that uniquely -- identifies it. -- (from L4E_APPENDER) feature -- Status Setting add_filter (filter: L4E_FILTER) -- Add 'filter' to the list of filters to -- apply when determining if a log event will -- be processed by this appender. -- (from L4E_APPENDER) require -- from L4E_APPENDER filter_exists: filter /= void filter_not_added: not has_filter (filter) ensure -- from L4E_APPENDER filter_added: has_filter (filter) append (event: L4E_EVENT) -- Log event on this appender. -- (from L4E_APPENDER) require -- from L4E_APPENDER event_exists: event /= void is_open: is_open has_filter (filter: L4E_FILTER): BOOLEAN -- Is 'filter' in the list of filters for this -- appender? -- (from L4E_APPENDER) require -- from L4E_APPENDER filter_exists: filter /= void remove_filter (filter: L4E_FILTER) -- Remove 'filter' from the list of filters for this -- appender. -- (from L4E_APPENDER) require -- from L4E_APPENDER filter_exists: filter /= void filter_added: has_filter (filter) ensure -- from L4E_APPENDER filter_removed: not has_filter (filter) set_layout (new_layout: L4E_LAYOUT) -- Set the layout that this appender should use. -- (from L4E_APPENDER) require -- from L4E_APPENDER layout_exists: new_layout /= void set_name (new_name: STRING) -- Set the name of this appender -- (from L4E_APPENDER) require -- from L4E_APPENDER name_exists: new_name /= void feature -- Stream stream: KI_TEXT_OUTPUT_FILE -- Stream to write log events to invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) end -- class L4E_FILE_APPENDER
Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:

Goanna Log4E -- Copyright © 2002 Glenn Maughan