Class: RubyLLM::MCP::Auth::BrowserOAuthProvider::SynchronizedLogger
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Auth::BrowserOAuthProvider::SynchronizedLogger
- Defined in:
- lib/ruby_llm/mcp/auth/browser_oauth_provider.rb
Overview
Serializes logger calls so test doubles and non-thread-safe loggers remain safe when callback and main threads log at the same time.
Instance Method Summary collapse
- #debug ⇒ Object
- #error ⇒ Object
- #info ⇒ Object
-
#initialize(logger) ⇒ SynchronizedLogger
constructor
A new instance of SynchronizedLogger.
- #warn ⇒ Object
Constructor Details
#initialize(logger) ⇒ SynchronizedLogger
Returns a new instance of SynchronizedLogger.
13 14 15 16 |
# File 'lib/ruby_llm/mcp/auth/browser_oauth_provider.rb', line 13 def initialize(logger) @logger = logger @mutex = Mutex.new end |
Instance Method Details
#debug ⇒ Object
18 19 20 |
# File 'lib/ruby_llm/mcp/auth/browser_oauth_provider.rb', line 18 def debug(...) synchronized_log(:debug, ...) end |
#error ⇒ Object
30 31 32 |
# File 'lib/ruby_llm/mcp/auth/browser_oauth_provider.rb', line 30 def error(...) synchronized_log(:error, ...) end |
#info ⇒ Object
22 23 24 |
# File 'lib/ruby_llm/mcp/auth/browser_oauth_provider.rb', line 22 def info(...) synchronized_log(:info, ...) end |
#warn ⇒ Object
26 27 28 |
# File 'lib/ruby_llm/mcp/auth/browser_oauth_provider.rb', line 26 def warn(...) synchronized_log(:warn, ...) end |