Skip to content

feat: print jornalctl log before failure of WaitForLogMessage#29

Open
locnnil wants to merge 5 commits into
canonical:mainfrom
locnnil:improve-waitforlog
Open

feat: print jornalctl log before failure of WaitForLogMessage#29
locnnil wants to merge 5 commits into
canonical:mainfrom
locnnil:improve-waitforlog

Conversation

@locnnil

@locnnil locnnil commented Apr 29, 2024

Copy link
Copy Markdown
Contributor

renovate Bot and others added 4 commits March 1, 2024 13:45
chore(deps): update dependency go to v1.22.1
…retchr-testify-1.x

fix(deps): update module github.com/stretchr/testify to v1.9.0
…l#24)

refact: export env variables to show up in documentation on pkg.go.dev
@locnnil locnnil requested a review from farshidtz April 29, 2024 16:49
Comment thread utils/config.go Outdated
t.Fatalf("Time out: reached max %d retries.", maxRetry)
t.Logf("Time out: reached max %d retries.", maxRetry)
stdout, _, _ := Exec(t,
fmt.Sprintf("sudo journalctl --lines=10 --no-pager --unit=snap.\"%s\".otbr-agent --priority=notice", snap))

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.

This will query the logs of a particular app (otbr-agent) and makes assumptions on the priority level and required number of lines to have sufficient debugging information.

The function could make use of a refactored SnapLogs function, rather than writing a new command.

Signed-off-by: Lincoln Wallace <lincoln.wallace@canonical.com>
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.

Update waitForLogMessage to print the tail before failing

2 participants