Skip to content

Add new env var to allow single-prefix multiline logs on stdout#4424

Open
nuclearpidgeon wants to merge 1 commit into
actions:mainfrom
nuclearpidgeon:disable-multiline-stdout-logging-prefixes
Open

Add new env var to allow single-prefix multiline logs on stdout#4424
nuclearpidgeon wants to merge 1 commit into
actions:mainfrom
nuclearpidgeon:disable-multiline-stdout-logging-prefixes

Conversation

@nuclearpidgeon
Copy link
Copy Markdown

Addresses #4423.

Given the existing behaviour is that multiline messages have a prefix per line, I've designed the variable in a manner where it only disables this behaviour if explicitly told to via the env var.

@nuclearpidgeon nuclearpidgeon requested a review from a team as a code owner May 17, 2026 05:09
public static readonly string ForcedInternalNodeVersion = "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION";
public static readonly string ForcedActionsNodeVersion = "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION";
public static readonly string PrintLogToStdout = "ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT";
public static readonly string StdoutMultilineLogPrefixing = "ACTIONS_RUNNER_STDOUT_MULTILINE_LOG_PREFIXING";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest name the ENV as the disablexxxx.
ex:
DisableStdoutMultilineLogPrefixing = "ACTIONS_RUNNER_DISABLE_STDOUT_MULTILINE_LOG_PREFIXING".

then, in src/Runner.Common/StdoutTraceListener.cs

bool _disablePrefixMultilineLogs = StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable(Constants.Variables.Agent.DisableStdoutMultilineLogPrefixing, defaultValue: false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants