Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:
indexing description: "Logging logger." 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_LOGGER create make feature -- Status Report name: STRING -- Name of this logger priority: L4E_PRIORITY -- Starting from this caregory, search the logger -- hieararchy for a non-null priority and return it. -- Otherwise, return the priority of the root logger. parent: L4E_LOGGER -- The parent of this logger. context: L4E_HIERARCHY -- The hierarchy in which this logger operates. is_additive: BOOLEAN -- Should appenders of this logger's parent be used? is_priority_set: BOOLEAN -- Does this logger have a priority set? False if the priority -- will be inherited from an ancestor. appenders: DS_LINKED_LIST [L4E_APPENDER] -- Appenders for this logger. is_enabled_for (check_priority: L4E_PRIORITY): BOOLEAN -- Is this logger enabled for 'check_priority'? require check_priority_exists: check_priority /= void ensure true_if_priority_enabled: Result = (context.disabled < check_priority.level and priority <= check_priority) feature -- Status Setting set_priority (new_priority: L4E_PRIORITY) -- Set the priority for this logger. Pass Void to unset the -- priority and use an ancestor's. require priority_exists: new_priority /= void add_appender (new_appender: L4E_APPENDER) -- Add 'new_appender' to the list of -- appenders for this logger. require new_appender_exists: new_appender /= void not_added: not appenders.has (new_appender) ensure appender_added: appenders.has (new_appender) remove_appender (appender_name: STRING) -- Remove appender with name 'appender_name' -- Iterates to find matching appender. require name_exists: appender_name /= void call_appenders (event: L4E_EVENT) -- Send 'event' to all appenders of this -- logger and recursively parents appenders if -- additive. require event_exists: event /= void close_appenders -- Close all appenders set_additive (flag: BOOLEAN) -- Set additive status to 'flag'. feature -- Logging debugging (message: ANY) -- Log a message object with the priority Debug. -- First checks if this logger is enabled -- by comparing the priority of this logger -- with the Debug priority. If this logger -- is debug enabled, then it converts the -- message object to a string by invoking -- 'out'. It then proceeds to call all the -- registered appenders in this logger and -- also higher in the hierarchy depending on -- the value of the additivity flag. require message_exists: message /= void warn (message: ANY) -- Log a message object with the priority Warn. -- First checks if this logger is enabled -- by comparing the priority of this logger -- with the Warn priority. If this logger -- is warn enabled, then it converts the -- message object to a string by invoking -- 'out'. It then proceeds to call all the -- registered appenders in this logger and -- also higher in the hierarchy depending on -- the value of the additivity flag. require message_exists: message /= void info (message: ANY) -- Log a message object with the priority Info. -- First checks if this logger is enabled -- by comparing the priority of this logger -- with the Info priority. If this logger -- is info enabled, then it converts the -- message object to a string by invoking -- 'out'. It then proceeds to call all the -- registered appenders in this logger and -- also higher in the hierarchy depending on -- the value of the additivity flag. require message_exists: message /= void error (message: ANY) -- Log a message object with the priority Error. -- First checks if this logger is enabled -- by comparing the priority of this logger -- with the Error priority. If this logger -- is info enabled, then it converts the -- message object to a string by invoking -- 'out'. It then proceeds to call all the -- registered appenders in this logger and -- also higher in the hierarchy depending on -- the value of the additivity flag. require message_exists: message /= void fatal (message: ANY) -- Log a message object with the priority Fatal. -- First checks if this logger is enabled -- by comparing the priority of this logger -- with the Fatal priority. If this logger -- is error enabled, then it converts the -- message object to a string by invoking -- 'out'. It then proceeds to call all the -- registered appenders in this logger and -- also higher in the hierarchy depending on -- the value of the additivity flag. require message_exists: message /= void log (event_priority: L4E_PRIORITY; message: ANY) -- Log a general message. require event_priority_exists: event_priority /= void message_exists: message /= void feature -- Comparison infix "<" (other: like Current): BOOLEAN -- Is current object less than other? invariant name_exists: name /= void and then not name.is_empty appenders_exist: appenders /= void end -- class L4E_LOGGER
Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:

Goanna Log4E -- Copyright © 2002 Glenn Maughan