Class: DevSystem::ColorOutputHandlerLog
- Inherits:
-
OutputHandlerLog
- Object
- Liza::Unit
- Liza::Controller
- Log
- HandlerLog
- OutputHandlerLog
- DevSystem::ColorOutputHandlerLog
- Defined in:
- lib/dev_system/subsystems/log/handler_logs/color_output_handler_log.rb
Instance Attribute Summary
Attributes inherited from Liza::Controller
Class Method Summary collapse
Methods inherited from OutputHandlerLog
Methods inherited from Liza::Controller
#`, `, attr_accessor, attr_reader, attr_writer, #attrs, box, #box, call, color, division, division!, division?, inherited, menv_accessor, menv_reader, menv_writer, on_connected, panel, #panel, plural, require, requirements, sh, #sh, singular, subsystem, subsystem!, subsystem?, subsystem_token, token
Methods inherited from Liza::Unit
_erbs_for, #add, add, cl, #cl, class_methods_defined, const_added, const_missing, constants_defined, define_error, descendants_select, division, erbs_available, erbs_defined, erbs_for, errors, #fetch, fetch, get, #get, instance_methods_defined, log, #log, log?, #log?, #log_array, log_array, log_hash, #log_hash, #log_level, log_level, #log_level?, log_level?, log_levels, #log_levels, #log_render_convert, #log_render_format, #log_render_in, #log_render_out, method_added, methods_defined, namespace, part, raise_error, #raise_error, reload!, #reload!, #render, #render!, #render_stack, renderable_formats_for, renderable_names, section, sections, #set, set, #settings, settings, singleton_method_added, sleep, #sleep, stick, #stick, sticks, #sticks, subclasses_select, subunits, system, #system, system?, test_class, time_diff, #time_diff
Class Method Details
.sidebar_for(env) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/dev_system/subsystems/log/handler_logs/color_output_handler_log.rb', line 3 def self. env = "" source = env[:unit_class] system_color = source.system.color || :white source_color = source.color || :white size = 0 # TODO: Figure out why RequestPanel is returning false when started from rack command but not from request command # source_is_a_panel = source < Panel # source_is_a_panel = source.ancestors.include? Panel # source_is_a_panel = env[:unit].is_a? Panel source_is_a_panel = source.to_s.end_with? "Panel" if source_is_a_panel namespace, _sep, classname = env[:unit_class].controller.name.rpartition('::') unless namespace.empty? << stick(namespace, system_color, :b).to_s << "::" size += namespace.size + 2 end << stick(classname, source_color, :b).to_s size += classname.size << ".panel." size += 7 else method_sep = env[:instance] ? "#" : ":" namespace, _sep, classname = env[:unit_class].name.rpartition('::') unless namespace.empty? << stick(namespace, system_color, :b).to_s << "::" size += namespace.size + 2 end << stick(classname, source_color, :b).to_s << method_sep size += classname.size + 1 end << env[:method_name] size += env[:method_name].size size = DevBox[:log]. - size - 1 size = 0 if size < 0 << " " * size rescue => e puts e binding.irb end |