Module: MongrelDbg

### Home Classes Methods

### In Files

- lib/mongrel/debug.rb

### Methods

- ::begin_trace
- ::configure
- ::end_trace
- ::trace
- ::tracing?

### Files

- CHANGELOG
- COPYING
- LICENSE
- README
- Makefile

### Class/Module Index

Quicksearch

- Mongrel
- Mongrel::CGIWrapper
- Mongrel::Camping
- Mongrel::Camping::CampingHandler
- Mongrel::Command
- Mongrel::Command::Base
- Mongrel::Command::Registry
- Mongrel::Configurator
- Mongrel::Const
- Mongrel::DeflateFilter
- Mongrel::DirHandler
- Mongrel::Error404Handler
- Mongrel::Gems
- Mongrel::HeaderOut
- Mongrel::HttpHandler
- Mongrel::HttpHandlerPlugin
- Mongrel::HttpParams
- Mongrel::HttpParser
- Mongrel::HttpParserError
- Mongrel::HttpRequest
- Mongrel::HttpResponse
- Mongrel::HttpServer
- Mongrel::Rails
- Mongrel::Rails::RailsConfigurator
- Mongrel::Rails::RailsHandler
- Mongrel::RedirectHandler
- Mongrel::StatisticsFilter
- Mongrel::Stats
- Mongrel::StatusHandler
- Mongrel::StopServer
- Mongrel::TimeoutError
- Mongrel::URIClassifier
- Mongrel::URIClassifier::RegistrationError
- Mongrel::URIClassifier::UsageError
- RequestLog
- RequestLog::Access
- RequestLog::Files
- RequestLog::Objects
- RequestLog::Params
- RequestLog::Threads
- IO
- Kernel
- MongrelDbg
- TCPServer

No matching classes.

# MongrelDbg

### Constants

LOGGING
SETTINGS

### Public Class Methods

begin_trace(target) click to toggle source

    # File lib/mongrel/debug.rb, line 33
    def MongrelDbg::begin_trace(target)
      SETTINGS[:tracing][target] = true
      if not LOGGING[target]
        LOGGING[target] = Logger.new(File.join(@log_dir, "#{target.to_s}.log"))
      end
      MongrelDbg::trace(target, "TRACING ON #{Time.now}")
    end

configure(log_dir = File.join("log","mongrel_debug")) click to toggle source

    # File lib/mongrel/debug.rb, line 16
    def MongrelDbg::configure(log_dir = File.join("log","mongrel_debug"))
      FileUtils.mkdir_p(log_dir)
      @log_dir = log_dir
      $objects_out=open(File.join("log","mongrel_debug","objects.log"),"w")
      $objects_out.puts "run,classname,last,count,delta,lenmean,lensd,lenmax"
      $objects_out.sync = true
      $last_stat = nil
      $run_count = 0
    end

end_trace(target) click to toggle source

    # File lib/mongrel/debug.rb, line 41
    def MongrelDbg::end_trace(target)
      SETTINGS[:tracing][target] = false
      MongrelDbg::trace(target, "TRACING OFF #{Time.now}")
      LOGGING[target].close
      LOGGING[target] = nil
    end

trace(target, message) click to toggle source

    # File lib/mongrel/debug.rb, line 27
    def MongrelDbg::trace(target, message)
      if SETTINGS[:tracing][target] and LOGGING[target]
        LOGGING[target].log(Logger::DEBUG, message)
      end
    end

tracing?(target) click to toggle source

    # File lib/mongrel/debug.rb, line 48
    def MongrelDbg::tracing?(target)
      SETTINGS[:tracing][target]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.