Skip to content

Long multiline log lines in startup log makes the logs unreadable #14882

@mafredri

Description

@mafredri

For really long log lines, the text ends up overlapping a bunch of other lines and it becomes a garbled mess.

EDIT: Actually, seems to include newlines which is probably the primary cause of this visual glitch.

image

Here's the contents of span for posterity:

<span>=== Running the init command /bin/sh [-c #!/usr/bin/env sh
set -eux
# Sleep for a good long while before exiting.
# This is to allow folks to exec into a failed workspace and poke around to
# troubleshoot.
waitonexit() {
	echo "=== Agent script exited with non-zero code ($?). Sleeping 24h to preserve logs..."
	sleep 86400
}
trap waitonexit EXIT
BINARY_DIR="${BINARY_DIR:-$(mktemp -d -t coder.XXXXXX)}"
BINARY_NAME=coder
BINARY_URL=https://dev.coder.com/bin/coder-linux-amd64
cd "$BINARY_DIR"
# Attempt to download the coder agent.
# This could fail for a number of reasons, many of which are likely transient.
# So just keep trying!
while :; do
	# Try a number of different download tools, as we don not know what we
	# will have available.
	status=""
	if command -v curl &gt;/dev/null 2&gt;&amp;1; then
		curl -fsSL --compressed "${BINARY_URL}" -o "${BINARY_NAME}" &amp;&amp; break
		status=$?
	elif command -v wget &gt;/dev/null 2&gt;&amp;1; then
		wget -q "${BINARY_URL}" -O "${BINARY_NAME}" &amp;&amp; break
		status=$?
	elif command -v busybox &gt;/dev/nul</span>

Metadata

Metadata

Assignees

No one assigned

    Labels

    s3Bugs that confuse, annoy, or are purely cosmeticsiteArea: frontend dashboard

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions