Class: UnionPay::Core::Logger::NetLog
- Inherits:
-
Object
- Object
- UnionPay::Core::Logger::NetLog
- Defined in:
- lib/union-pay/core/logger.rb
Instance Method Summary collapse
-
#initialize ⇒ NetLog
constructor
A new instance of NetLog.
- #log(req, resp, notice = false) ⇒ Object
Constructor Details
#initialize ⇒ NetLog
Returns a new instance of NetLog.
13 14 15 16 17 18 19 |
# File 'lib/union-pay/core/logger.rb', line 13 def initialize if defined?(Rails) @logger = Rails.logger else @logger = ::Logger.new(STDOUT) end end |
Instance Method Details
#log(req, resp, notice = false) ⇒ Object
21 22 23 |
# File 'lib/union-pay/core/logger.rb', line 21 def log(req, resp, notice=false) @logger.info("unionpay req: #{req.inspect} -- resp: #{resp.inspect} -- notice:#{notice.inspect}") end |