Class: McpLogs::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/mcp_logs/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/mcp_logs/configuration.rb', line 18

def initialize
  @enabled               = true
  @server                = nil
  @base_controller_class = nil
  @tool_sections         = {}
  @record_payloads       = true
  @max_payload_bytes     = 64_000
  @payload_filter        = ->(payload) { payload }
  @retention_days        = 30
  @abandoned_after_hours = 24
  @page_size             = 50
end

Instance Attribute Details

#abandoned_after_hoursObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def abandoned_after_hours
  @abandoned_after_hours
end

#base_controller_classObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def base_controller_class
  @base_controller_class
end

#enabledObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def enabled
  @enabled
end

#max_payload_bytesObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def max_payload_bytes
  @max_payload_bytes
end

#page_sizeObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def page_size
  @page_size
end

#payload_filterObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def payload_filter
  @payload_filter
end

#record_payloadsObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def record_payloads
  @record_payloads
end

#retention_daysObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def retention_days
  @retention_days
end

#serverObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def server
  @server
end

#tool_sectionsObject

server: a lambda returning the host's MCP::Server. Read by the docs page only — capture never builds a server. base_controller_class: a String, constantized on first autoload of the engine's ApplicationController, i.e. after host initializers have run. Has no default on purpose — see McpLogs.base_controller. tool_sections: { "Section title" => ["tool_name", ...] }. Names, not classes, so the gem never references host constants.



14
15
16
# File 'lib/mcp_logs/configuration.rb', line 14

def tool_sections
  @tool_sections
end