Module: Sequel::CallerLogging
- Defined in:
- lib/sequel/extensions/caller_logging.rb
Constant Summary collapse
- SEQUEL_LIB_PATH =
(File.('../../..', __FILE__) + '/').freeze
- RUBY_STDLIB =
RbConfig::CONFIG["rubylibdir"]
- INTERNAL =
'<internal'
Instance Attribute Summary collapse
-
#caller_logging_formatter ⇒ Object
A callable to format the external caller.
-
#caller_logging_ignore ⇒ Object
A regexp of caller lines to ignore, in addition to internal Sequel and Ruby code.
Instance Method Summary collapse
-
#log_connection_yield(sql, conn, args = nil) ⇒ Object
Include caller information when logging query.
Instance Attribute Details
#caller_logging_formatter ⇒ Object
A callable to format the external caller
46 47 48 |
# File 'lib/sequel/extensions/caller_logging.rb', line 46 def caller_logging_formatter @caller_logging_formatter end |
#caller_logging_ignore ⇒ Object
A regexp of caller lines to ignore, in addition to internal Sequel and Ruby code.
43 44 45 |
# File 'lib/sequel/extensions/caller_logging.rb', line 43 def caller_logging_ignore @caller_logging_ignore end |
Instance Method Details
#log_connection_yield(sql, conn, args = nil) ⇒ Object
Include caller information when logging query.
49 50 51 52 53 54 |
# File 'lib/sequel/extensions/caller_logging.rb', line 49 def log_connection_yield(sql, conn, args=nil) if !@loggers.empty? && (external_caller = external_caller_for_log) sql = "#{external_caller} #{sql}" end super end |