Skip to content

Commit

Permalink
fix logger progname and add http agent name
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed Sep 10, 2011
1 parent 7814f8d commit cb4ba70
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
fb_graph (2.1.0)
fb_graph (2.1.2)
httpclient (>= 2.2.0.2)
rack-oauth2 (>= 0.8.0)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.1.1
2.1.2
5 changes: 4 additions & 1 deletion lib/fb_graph.rb
Expand Up @@ -3,6 +3,9 @@
require 'patch/rack/oauth2/util'

module FbGraph
VERSION = ::File.read(
::File.join(::File.dirname(__FILE__), '../VERSION')
)
ROOT_URL = "https://graph.facebook.com"

def self.logger
Expand All @@ -12,7 +15,7 @@ def self.logger=(logger)
@@logger = logger
end
self.logger = Logger.new(STDOUT)
self.logger.progname = 'Paypal::Express'
self.logger.progname = 'FbGraph'

def self.debugging?
@@debugging
Expand Down
4 changes: 3 additions & 1 deletion lib/fb_graph/node.rb
Expand Up @@ -59,7 +59,9 @@ def delete(params = {})
end

def http_client
_http_client_ = HTTPClient.new
_http_client_ = HTTPClient.new(
:agent_name => "FbGraph (#{VERSION})"
)
_http_client_.request_filter << Debugger::RequestFilter.new if FbGraph.debugging?
_http_client_
end
Expand Down

0 comments on commit cb4ba70

Please sign in to comment.