module Sequel::Deprecation

This module makes it easy to print deprecation warnings with optional backtraces to a given stream. There are a two accessors you can use to change how/where the deprecation methods are printed and whether/how backtraces should be included:

Sequel::Deprecation.output = $stderr # print deprecation messages to standard error (default)
Sequel::Deprecation.output = File.open('deprecated_calls.txt', 'wb') # use a file instead
Sequel::Deprecation.output = false # do not output deprecation messages

Sequel::Deprecation.prefix = "SEQUEL DEPRECATION WARNING: " # prefix deprecation messages with a given string (default)
Sequel::Deprecation.prefix = false # do not prefix deprecation messages

Sequel::Deprecation.backtrace_filter = false # don't include backtraces
Sequel::Deprecation.backtrace_filter = true # include full backtraces
Sequel::Deprecation.backtrace_filter = 10 # include 10 backtrace lines (default)
Sequel::Deprecation.backtrace_filter = 1 # include 1 backtrace line
Sequel::Deprecation.backtrace_filter = lambda{|line, line_no| line_no < 3 || line =~ /my_app/} # select backtrace lines to output