Your -d
and --debug
options are being interpreted by Shotgun, rather than Thin, and that is what is setting $DEBUG
to true.
Thin’s command line flag to turn on debugging is -D
or --debug
and this sets Thin::Logging.debug
to true. You can’t use the thin
command line options (sine the command line is being read by shotgun
which launches the server), but you can set this variable with some normal Ruby code. One way to do this would be with a shotgun.rb
file that requires Thin and changes the setting:
require 'thin'
Thin::Logging.debug = true
(You might want to put this in a begin...rescue...block
and rescue the LoadError in case Thin isn’t available.)
The output without this file:
$ shotgun
== Shotgun/Thin on http://127.0.0.1:9393/
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:9393, CTRL+C to stop
and with the file:
$ shotgun
== Shotgun/Thin on http://127.0.0.1:9393/
>> Thin web server (v1.4.1 codename Chromeo)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:9393, CTRL+C to stop
As far as I can tell, this setting only affects the verbosity of Thin’s logging, and doesn’t have anything to do with the Debugger gem.