Skip to content

Instantly share code, notes, and snippets.

@tamoot
Created October 11, 2010 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamoot/620599 to your computer and use it in GitHub Desktop.
Save tamoot/620599 to your computer and use it in GitHub Desktop.
diff --git a/tdiary/dispatcher.rb b/tdiary/dispatcher.rb
index d95e00c..5077ab3 100644
--- a/tdiary/dispatcher.rb
+++ b/tdiary/dispatcher.rb
@@ -4,6 +4,9 @@ require 'stringio'
require 'tdiary'
require 'tdiary/tdiary_response'
+require 'logger'
+$logger = Logger.new("testable.txt")
+
module TDiary
class Dispatcher
class << self
@@ -11,6 +14,7 @@ module TDiary
def send_headers( status, headers )
$stdout.print "Status: #{status}\r\n"
headers.each { |k, vs|
+$logger.info "key=>#{k}, value=>#{vs.inspect}"
vs.split( "\n" ).each { |v|
$stdout.print "#{k}: #{v}\r\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment