Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.utility

Class EM_LOGGER



Creation

Features

Invariants

indexing

description

Please see EM_LOGGING for more information

date

$Date: 2005/10/24 04:01:08 $

revision

$Revision: 1.7 $

class

EM_LOGGER

create

make

-- creation procedure

make_with_file (a_file_name: STRING)

-- creates a file, in which output may be generated

require
a_file_name_exist: a_file_name /= void
a_file_name_not_empty: not a_file_name.is_empty
ensure
file_name_set: file_name = a_file_name

feature -- Removal

delete_file

-- deletes/resets the file, if a filename is known

feature -- Creation

make

-- creation procedure

make_with_file (a_file_name: STRING)

-- creates a file, in which output may be generated

require
a_file_name_exist: a_file_name /= void
a_file_name_not_empty: not a_file_name.is_empty
ensure
file_name_set: file_name = a_file_name

feature -- Element Change

set_file (a_file_name: STRING)

-- sets the file reference

require
a_file_name_exist: a_file_name /= void
a_file_name_not_empty: not a_file_name.is_empty
ensure
file_name_set: file_name = a_file_name
set_output_debug_to_console (v: BOOLEAN)

-- true, if debugging information should be displayed in the console

ensure
set_output_debug_to_file (v: BOOLEAN)

-- true, if debugging information should be displayed in the file

require
file_name_exist: file_name /= void
file_must_be_set: not file_name.is_empty
ensure
set_output_error_to_console (v: BOOLEAN)

-- true, if errors should be displayed in the console

ensure
set_output_error_to_file (v: BOOLEAN)

-- true, if errors should be displayed in the file

require
file_name_exist: file_name /= void
file_must_be_set: not file_name.is_empty
ensure
set_output_log_to_console (v: BOOLEAN)

-- true, if the logs should be displayed in the console

ensure
set_output_log_to_file (v: BOOLEAN)

-- true, if the logs should be displayed in the file

require
file_name_exist: file_name /= void
file_must_be_set: not file_name.is_empty
ensure
set_output_newline (v: BOOLEAN)

-- true, if a newline should be displayed at the end of the line
-- default is true

ensure
set_output_time (v: BOOLEAN)

-- true, if the time should be displayed

ensure
set_output_type (v: BOOLEAN)

-- true, if the type of the output should be displayed
-- default is true

ensure
set_output_warning_to_console (v: BOOLEAN)

-- true, if warnings should be displayed in the console

ensure
set_output_warning_to_file (v: BOOLEAN)

-- true, if warnings should be displayed in the file

require
file_name_exist: file_name /= void
file_must_be_set: not file_name.is_empty
ensure
set_time_format (s: STRING)

-- sets the time format

ensure

feature -- Output

write_debug (s: STRING)

-- logs the string s, if some log_output is enabled

require
s_not_void: s /= Void
write_error (s: STRING)

-- logs the string s, if some log_output is enabled

require
s_not_void: s /= Void
write_log (s: STRING)

-- logs the string s, if some log_output is enabled

require
s_not_void: s /= Void
write_warning (s: STRING)

-- logs the string s, if some log_output is enabled

require
s_not_void: s /= Void

feature -- Queries

debug_output_console: BOOLEAN

-- if true, debug output will be done in the console

debug_output_file: BOOLEAN

-- if true, debug output will be done in a file

error_output_console: BOOLEAN

-- if true, error output will be done in the console

error_output_file: BOOLEAN

-- if true, error output will be done in a file

file_name: STRING

-- the file, in which we want to write the logs

log_output_console: BOOLEAN

-- if true, log output will be done in the console

log_output_file: BOOLEAN

-- if true, log output will be done in a file

output_newline: BOOLEAN

-- if true, a newline will be displayed

output_time: BOOLEAN

-- if true, the time is displayed at the beginning of each message

output_type: BOOLEAN

-- if true, the type will be displayed aswell, for example
-- "ERROR: "+somestring+newline

time_format: STRING

-- the format of the time string

warning_output_console: BOOLEAN

-- if true, warning output will be done in the console

warning_output_file: BOOLEAN

-- if true, warning output will be done in a file

invariant

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end