Module: Log::Filter
- Included in:
- Log
- Defined in:
- lib/log/filter.rb
Instance Method Summary collapse
- #log_all_tags? ⇒ Boolean
- #log_untagged? ⇒ Boolean
- #precedent?(message_level) ⇒ Boolean
- #tags_intersect?(message_tags) ⇒ Boolean (also: #logger_tags_intersect?)
- #write_level?(message_level) ⇒ Boolean
- #write_tag?(message_tags) ⇒ Boolean
Instance Method Details
#log_all_tags? ⇒ Boolean
47 48 49 |
# File 'lib/log/filter.rb', line 47 def logger_tag?(:_all) end |
#log_untagged? ⇒ Boolean
51 52 53 |
# File 'lib/log/filter.rb', line 51 def log_untagged? logger_tag?(:_untagged) end |
#precedent?(message_level) ⇒ Boolean
15 16 17 |
# File 'lib/log/filter.rb', line 15 def precedent?() ordinal() <= logger_ordinal end |
#tags_intersect?(message_tags) ⇒ Boolean Also known as:
55 56 57 58 59 60 61 |
# File 'lib/log/filter.rb', line 55 def () if !( & ).empty? return false end !( & ).empty? end |
#write_level?(message_level) ⇒ Boolean
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/log/filter.rb', line 3 def write_level?() if .nil? && !logger_level? return true end if .nil? || !logger_level? return false end precedent?() end |
#write_tag?(message_tags) ⇒ Boolean
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 |
# File 'lib/log/filter.rb', line 19 def write_tag?() ||= [] if .empty? && ! return true end if .include?(:*) return true end if return true end if .empty? && log_untagged? return true end if !.empty? && if () return true end end false end |