Module: Tracee
- Defined in:
- lib/tracee/preprocessors/quiet_assets.rb,
lib/tracee.rb,
lib/tracee/stack.rb,
lib/tracee/logger.rb,
lib/tracee/stream.rb,
lib/tracee/version.rb,
lib/tracee/benchmarkable.rb,
lib/tracee/ext/exception.rb,
lib/tracee/ext/better_errors.rb,
lib/tracee/ext/active_support.rb,
lib/tracee/preprocessors/base.rb,
lib/tracee/stack/base_decorator.rb,
lib/tracee/preprocessors/formatter.rb
Overview
quiet_assets gem works only on thread-safe environment or on multithreaded one with only few assets. Known issue: github.com/evrone/quiet_assets/issues/40 I’d fix it so that it would always reset log_level to that of Rails.application.config.log_level But such an approach will not allow to change log_level within runtime.
Tracee deals with it in pretty straightforward manner. It just ignores whatever we do not care about.
Defined Under Namespace
Modules: Benchmarkable, Extensions, Preprocessors, Stack
Classes: Benchmark, IndifferentStream, Logger, Stream
Constant Summary
collapse
- CALLER_RE =
%r{^(?<path>.*?(?<file>[^/\\]+?))#{ }:(?<line>\d+)(?::in #{ }`(?<is_block>block (?:\((?<block_level>\d+) levels\) )?in )?(?<method>.+?)'#{ })?$}
- IGNORE_RE =
%r{/irb(/|\.rb$)#{ }|^[\w\-]+ \([\d\.]+\) #{ }|lib/active_support/dependencies.rb$#{ }|^-e$#{ }|^(script|bin)/#{ }|/gems/bundler-\d|ruby-\d.\d.\d(@[^/]+)?/bin/#{ }|bin/rails$|lib/rails/commands(/|\.rb$)#{ }|lib/spring/#{ }|/rubygems/core_ext/kernel_require.rb#{ }}
- VERSION =
'1.0.20'
Class Method Summary
collapse
Class Method Details
.decorate_active_support_stack ⇒ Object
.decorate_better_errors_stack(from_decorate_everywhere = false) ⇒ Object
95
96
97
98
99
100
101
102
103
|
# File 'lib/tracee.rb', line 95
def decorate_better_errors_stack(from_decorate_everywhere=false)
if defined? BetterErrors
BetterErrors::Middleware.class_eval do
include Tracee::Extensions::BetterErrors::Middleware
end
elsif !from_decorate_everywhere
warn "Tracee.decorate_better_errors_stack was ignored, because BetterErrors hadn't been defined."
end
end
|
.decorate_exceptions_stack ⇒ Object
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/tracee.rb', line 83
def decorate_exceptions_stack
Exception.trace_decorator = Stack::BaseDecorator
[SystemStackError, NoMemoryError, NameError, defined?(IRB::Abort) && IRB::Abort].compact.each do |klass|
klass.trace_decorator = nil
end
NoMethodError.trace_decorator = Exception.trace_decorator
end
|
.decorate_stack_everywhere ⇒ Object
109
110
111
112
113
|
# File 'lib/tracee.rb', line 109
def decorate_stack_everywhere
decorate_exceptions_stack
decorate_better_errors_stack(true)
decorate_active_support_stack
end
|