Skip to content

Commit 1065596

Browse files
committed
Add log level input to Copilot CLI action for configurable logging
1 parent d8b3ed0 commit 1065596

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ inputs:
6464
agent:
6565
description: 'Specify a custom agent to use'
6666
required: false
67+
log-level:
68+
description: 'Set the log level (choices: "none", "error", "warning", "info", "debug", "all", "default")'
69+
required: false
70+
default: 'all'
6771
outputs:
6872
logs-path:
6973
description: 'Path to the copilot logs directory'
@@ -171,6 +175,9 @@ runs:
171175
fi
172176
fi
173177
178+
if [ -n "$LOG_LEVEL" ]; then
179+
COPILOT_ARGS+="--log-level $LOG_LEVEL "
180+
fi
174181
COPILOT_ARGS+="--log-dir $HOME/.copilot/logs"
175182
176183
echo "$COPILOT_ARGS"
@@ -186,6 +193,7 @@ runs:
186193
DISABLE_MCP_SERVERS: ${{ inputs.disable-mcp-servers }}
187194
ENABLE_ALL_GITHUB_MCP_TOOLS: ${{ inputs.enable-all-github-mcp-tools }}
188195
RESUME_SESSION: ${{ inputs.resume-session }}
196+
LOG_LEVEL: ${{ inputs.log-level }}
189197
- name: Run Copilot CLI
190198
id: copilot
191199
shell: bash

0 commit comments

Comments
 (0)