Module: PostHog::MCP::Log Private
- Defined in:
- lib/posthog/mcp/log.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Logging for the MCP integration.
Debug-level chatter goes only to the logger: option (a no-op by default),
because a stdio MCP server owns $stdout for the protocol and the core
SDK's default logger writes there. Warnings additionally reach the app's
logger when Rails is loaded (where Logging.logger wraps
Rails.logger) and stderr otherwise, so misconfiguration is never silent
and never corrupts a stdio transport.
Class Method Summary collapse
- .debug(options, message) ⇒ Object private
- .warn(options, message) ⇒ Object private
Class Method Details
.debug(options, message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 |
# File 'lib/posthog/mcp/log.rb', line 18 def debug(, ) sink = .respond_to?(:logger) ? .logger : nil sink&.call() rescue StandardError nil end |
.warn(options, message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/posthog/mcp/log.rb', line 25 def warn(, ) debug(, ) if defined?(::Rails) PostHog::Logging.logger.warn() else Kernel.warn("[posthog-ruby] #{}") end rescue StandardError nil end |