Skip to main content

Staging Logs

Staging Logs is a feature that collects, separately for each staging, the logs of processing such as that executed in a session switched to the staging.
You can check the collected logs on the "Logs" tab of the staging detail screen, and the coding agent can also retrieve them via MCP.

Collected Logs​

ItemDescription
Target processingProcessing executed in that staging, such as processing executed in a session switched to the staging
Log levelDEBUG and above (TRACE is excluded)
Format[level] logger name - [message code] message. The stack trace of an exception is output on the following lines. The output time is not included.
Number retainedThe latest 4,000 entries per staging. Entries beyond that are deleted starting from the oldest.
Where retainedIn the memory of the application server

Checking on the Logs Tab​

Opening the "Logs" tab of the staging detail screen displays the logs of that staging.

staging-logs-01

Logs are displayed separated into individual entries, and a stack trace is combined into the same entry as the log immediately before it.
ERROR is displayed with a light red background, and WARN with a light yellow background.

You can perform the following operations on the "Logs" tab.

OperationDescription
Retrieve logsLogs are retrieved again when you open the "Logs" tab and when you click "Refresh." They are not updated automatically.
Copy a logClicking the copy button at the left end of an ERROR or WARN log copies that single log entry (including the stack trace) to the clipboard, preceded by the sentence "Analyze the following error message and fix it." You can use the copied content as a request to the coding agent.
Delete logsClicking "Clear Logs" deletes the displayed logs from the server. No confirmation dialog is displayed.
Note

"Clear Logs" deletes the logs up to the point of the last retrieval. Logs output after that are not deleted and are displayed the next time you click "Refresh."

Retrieving from a Coding Agent​

Staging logs can be retrieved from the MCP server provided by the AI-native Development Support Feature.

ItemDescription
URL<iAP base URL>/copilot/mcp/development/staging/logs
AuthenticationSend an API key (scope development) in the Authorization: Bearer <API key> header

In a project created with the Accel CLI, the agent's MCP configuration is generated automatically based on the connection destination and API key registered with accel login. The server name is staging_log.
For how to issue an API key, see "Deploying with the Accel CLI" in Usage.

MCP Server Tools​

ToolArgumentsAction
get_staged_logsstagingId (required)Returns all logs of that staging, oldest first. The logs are not deleted.
delete_staged_logsstagingId (required), upToSeq (required)Deletes the logs whose sequence number is less than or equal to upToSeq, and returns the number of deleted entries.

In the result of get_staged_logs, the first line is maxSeq: <sequence number> and the second and subsequent lines are the log body.
maxSeq is the sequence number of the newest log at the time of retrieval. If there are no logs, only maxSeq: 0 is returned.

maxSeq: 42
[DEBUG] jp.co.intra_mart.foo - [] Processing started
[DEBUG] jp.co.intra_mart.bar - [] Completed

Passing the value of maxSeq to upToSeq of delete_staged_logs deletes only the logs already retrieved. Logs output after the retrieval are not deleted.

Example Request​

Tell the agent the target staging ID.

Retrieve the logs for staging my-app-staging, investigate the cause of the error, and fix it.

Notes​

  • When you undeploy, all logs of that staging are deleted. They are also deleted when you redeploy assets, because the previously active assets are undeployed.
  • Logs are retained in the memory of the application server, so they are deleted when the server is restarted.