Class: Fluent::Test::TestLogger
- Inherits:
-
PluginLogger
- Object
- Log
- PluginLogger
- Fluent::Test::TestLogger
- Defined in:
- lib/fluent/test/log.rb
Constant Summary
Constants inherited from Log
Log::IGNORE_SAME_LOG_MAX_CACHE_SIZE, Log::LEVEL_DEBUG, Log::LEVEL_ERROR, Log::LEVEL_FATAL, Log::LEVEL_INFO, Log::LEVEL_TEXT, Log::LEVEL_TRACE, Log::LEVEL_WARN, Log::LOG_EVENT_LABEL, Log::LOG_EVENT_TAG_PREFIX, Log::LOG_ROTATE_AGE, Log::LOG_TYPES, Log::LOG_TYPE_DEFAULT, Log::LOG_TYPE_SUPERVISOR, Log::LOG_TYPE_WORKER0
Instance Attribute Summary
Attributes inherited from Log
#format, #ignore_repeated_log_interval, #ignore_same_log_interval, #level, #log_event_enabled, #optional_attrs, #optional_header, #out, #suppress_repeated_stacktrace, #time_format
Instance Method Summary collapse
-
#initialize ⇒ TestLogger
constructor
A new instance of TestLogger.
- #logs ⇒ Object
- #reset ⇒ Object
Methods inherited from PluginLogger
#enable_color, #format=, #level=, #orig_enable_color, #orig_format=, #orig_time_format=, #time_format=
Methods inherited from Log
#caller_line, #debug, #debug_backtrace, #disable_events, #dump_stacktrace, #dup, #enable_color, #enable_color?, #enable_debug, #enable_event, #error, #error_backtrace, #event, event_tags, #fatal, #fatal_backtrace, #flush, #format_time, #get_worker_id, #ignore_repeated_log?, #ignore_same_log?, #info, #info_backtrace, #log_type, #logdev=, #on_debug, #on_error, #on_fatal, #on_info, #on_trace, #on_warn, per_process_path, #puts, #reopen!, #skipped_type?, #stdout?, str_to_level, #suppress_stacktrace?, #trace, #trace_backtrace, #warn, #warn_backtrace, #write
Constructor Details
#initialize ⇒ TestLogger
Returns a new instance of TestLogger.
61 62 63 64 65 66 67 68 |
# File 'lib/fluent/test/log.rb', line 61 def initialize @logdev = DummyLogDevice.new dl_opts = {} dl_opts[:log_level] = ServerEngine::DaemonLogger::INFO logger = ServerEngine::DaemonLogger.new(@logdev, dl_opts) log = Fluent::Log.new(logger) super(log) end |
Instance Method Details
#logs ⇒ Object
74 75 76 |
# File 'lib/fluent/test/log.rb', line 74 def logs @logdev.logs end |
#reset ⇒ Object
70 71 72 |
# File 'lib/fluent/test/log.rb', line 70 def reset @logdev.reset end |