|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Logging & Security - Logging and access control > MCP Commands - Logging & Security |
MiniRobot Language (MRL) - MCP Logging & Security Commands
MCP.SetLogLevel
Set Logging Level
Purpose
The MCP.SetLogLevel command configures the verbosity level of the MCP server's logging system. This controls which log messages are recorded based on their severity, helping to balance between detailed debugging information and log file size.
Available log levels (from most to least verbose):
• DEBUG - All messages including detailed debug information
• INFO - Informational messages and above
• WARNING - Warnings and errors only
• ERROR - Errors only
• NONE - No logging
Syntax
MCP.SetLogLevel|$$LEVEL
Parameters
$$LEVEL - The desired logging level. Valid values: DEBUG, INFO, WARNING, ERROR, NONE (case-insensitive).
Return Value
OK - Log level was set successfully
ERROR - Invalid log level specified
Examples
' Example 1: Enable debug logging for troubleshooting
MCP.SetLogLevel|DEBUG
' Example 2: Standard operational logging
MCP.SetLogLevel|INFO
' Example 3: Minimal logging in production
MCP.SetLogLevel|ERROR
' Example 4: Disable all logging
MCP.SetLogLevel|NONE
Remarks
The log level is effective immediately and affects all subsequent log messages. The change persists for the current session but does not modify the server's configuration file.
When set to a specific level, all messages at that level and above are logged. For example, setting the level to WARNING will log WARNING and ERROR messages, but not INFO or DEBUG.
Error Conditions
The command will fail with a parameter error if:
• The level parameter is missing
• An invalid log level is specified (not one of DEBUG, INFO, WARNING, ERROR, NONE)
See also:
• MCP.SetLogToConsole - Set Console Logging
• MCP.SetLogToFile - Set File Logging
• MCP.GetRetentionTime - Get Retention Time