Class: Wx::LogBuffer
Overview
This class is untracked and should not be derived from nor instances extended!
LogBuffer is a very simple implementation of log sink which simply collects all the logged messages in a string (except the debug messages which are output in the usual way immediately as we’re presumably not interested in collecting them for later).
The messages from different log function calls are separated by the new lines. All the messages collected so far can be shown to the user (and the current buffer cleared) by calling the overloaded #flush method.
Category: Logging
Instance Method Summary collapse
-
#clear ⇒ void
Clear all the messages in the buffer.
-
#get_buffer ⇒ Wx::String
(also: #buffer)
Returns the current buffer contains.
-
#initialize ⇒ Wx::LogBuffer
constructor
The default ctor does nothing.
Methods inherited from Log
add_trace_mask, clear_trace_masks, disable_timestamp, #do_log_record, #do_log_text, #do_log_text_at_level, dont_create_on_demand, enable_logging, #flush, flush_active, for_component, get_active_target, get_log_level, get_repetition_counting, get_timestamp, get_trace_masks, get_verbose, is_allowed_trace_mask, is_enabled, is_level_enabled, #log_record, remove_trace_mask, resume, set_active_target, set_component_level, set_log_level, set_repetition_counting, set_timestamp, set_verbose, suspend
Constructor Details
#initialize ⇒ Wx::LogBuffer
The default ctor does nothing.
347 |
# File 'lib/wx/doc/gen/log.rb', line 347 def initialize; end |
Instance Method Details
#clear ⇒ void
This method returns an undefined value.
Clear all the messages in the buffer.
This can be done to prevent them from being flushed by the next call to Wx::Log#flush, which happens implicitly if this logger ceases to be the active logger after a call to Wx::Log.set_active_target with a different log target.
353 |
# File 'lib/wx/doc/gen/log.rb', line 353 def clear; end |
#get_buffer ⇒ Wx::String Also known as: buffer
Returns the current buffer contains.
Messages from different log function calls are separated with the new lines in the buffer. The buffer can be cleared by Wx::Log#flush which will also show the current contents to the user.
359 |
# File 'lib/wx/doc/gen/log.rb', line 359 def get_buffer; end |