Use the logs command to inspect container logs for troubleshooting and monitoring.

Syntax

./mcpgen logs <profile_name>

Because the log output respects container log retention policies, use this command to investigate errors or unexpected behavior in the container. It accepts profile name as a required argument. You can also include the -f parameter to follow logs in real time for continuous monitoring.

Example

./mcpgen logs myprof -f

This command invokes the logs command in the mcpgen CLI to display logs from a profile container. In this example, myprof is the name of the profile whose container logs you want to view. The -f parameter streams the logs in real time. This is useful for monitoring ongoing activity or troubleshooting issues as they occur.