Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:
indexing description: "Hierarchy of logging categories." 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_HIERARCHY create make (priority: L4E_PRIORITY) -- Create a logger hierarchy with a -- root logger with priority 'priority'. ensure not_disabled: disabled = disable_off feature -- Constants Debug_int: INTEGER is 10000 -- (from L4E_PRIORITY_CONSTANTS) debug_p: L4E_PRIORITY -- Debug priority designates fine-grained -- informational events that are most useful -- to debug an application. -- (from L4E_PRIORITY_CONSTANTS) Error_int: INTEGER is 40000 -- (from L4E_PRIORITY_CONSTANTS) error_p: L4E_PRIORITY -- Error priority designates error events. -- (from L4E_PRIORITY_CONSTANTS) Fatal_int: INTEGER is 50000 -- (from L4E_PRIORITY_CONSTANTS) fatal_p: L4E_PRIORITY -- Fatal priority designates very severe error events -- that will presumably lead the application to abort. -- (from L4E_PRIORITY_CONSTANTS) Info_int: INTEGER is 20000 -- (from L4E_PRIORITY_CONSTANTS) info_p: L4E_PRIORITY -- Info priority designates informational -- messages that highlight the progress of -- the application at coarse-grained level. -- (from L4E_PRIORITY_CONSTANTS) Warn_int: INTEGER is 30000 -- (from L4E_PRIORITY_CONSTANTS) warn_p: L4E_PRIORITY -- Warn priority designates potentially -- harmful situations. -- (from L4E_PRIORITY_CONSTANTS) feature -- Initialisation make (priority: L4E_PRIORITY) -- Create a logger hierarchy with a -- root logger with priority 'priority'. ensure not_disabled: disabled = disable_off feature -- Logger Factory all_loggers: DS_LIST [L4E_LOGGER] -- Return list of all current categories. Root logger will be first in list logger (cat_name: STRING): L4E_LOGGER -- Return a logger for 'name'. Initialise a new -- logger instance if necessary. require cat_name_exists: cat_name /= void and then not cat_name.is_empty no_start_or_end_dots: cat_name.item (1) /= '.' and then cat_name.item (cat_name.count) /= '.' no_consecutive_dots: cat_name.substring_index ("..", 1) = 0 ensure logger_exists: has (cat_name) feature -- Status Report Disable_off: INTEGER is -1 -- Priority disabled off disabled: INTEGER -- Globally disabled priority level. Disable_off if no priorities -- are disabled. has (name: STRING): BOOLEAN -- Does a logger with 'name' exist in this hierarchy? require name_exists: name /= void is_enabled_for (priority: L4E_PRIORITY): BOOLEAN -- Is 'priority' level logging enabled for this hierarchy? root: L4E_LOGGER -- Root logger of this hierarchy feature -- Status Setting clear -- Clear all categories from this hierarchy close_all -- Close all appenders for all categories in this -- hierarchy disable (priority: L4E_PRIORITY) -- Disable all logging for level 'priority' require priority_exists: priority /= void ensure priority_disabled: disabled = priority.level disable_all -- Disable all logging disable_debug -- Disable debug logging disable_info -- Disable info logging enable_all -- Enable all logging invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) end -- class L4E_HIERARCHY
Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:

Goanna Log4E -- Copyright © 2002 Glenn Maughan