Skip to content

[8.19] [scout] support log level override (#228841)#230381

Merged
dmlemeshko merged 1 commit intoelastic:8.19from
dmlemeshko:backport/8.19/pr-228841
Aug 4, 2025
Merged

[8.19] [scout] support log level override (#228841)#230381
dmlemeshko merged 1 commit intoelastic:8.19from
dmlemeshko:backport/8.19/pr-228841

Conversation

@dmlemeshko
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## Summary

- default log level for Playwright fixtures is `info` , afaik default
for FTR and other scripts (but for now to better understand performance
issues we pass `debug` through `node scripts/scout`, to be reverted for
GA)
- `node scripts/scout` will propagate log level from cli flag (e.g.
--debug) with `SCOUT_LOG_LEVEL` env variable to playwright exec command
- since some Team may not use `scripts/scout` command, they can set
`LOG_LEVEL` variable to override to whatever level is needed
if both `LOG_LEVEL` and `SCOUT_LOG_LEVEL` are set, the later has
priority (important for us, shouldn't block others)

### Playwright Integration:
* Replaced the use of `getLogger` with the updated `ScoutLogger` call in
Playwright worker fixtures, enabling log level configuration via
environment variables.
* Modified the Playwright test runner to propagate the log level to the
test environment using the `SCOUT_LOG_LEVEL` variable.

---------

Co-authored-by: David Olaru <dolaru@vaevixen.com>
(cherry picked from commit d76a5be)

# Conflicts:
#	src/platform/packages/shared/kbn-scout/src/playwright/global_hooks/synthtrace_ingestion.ts
@dmlemeshko dmlemeshko added the backport This PR is a backport of another PR label Aug 4, 2025
@dmlemeshko dmlemeshko enabled auto-merge (squash) August 4, 2025 10:11
@dmlemeshko dmlemeshko requested a review from fake-haris August 4, 2025 10:12
@dmlemeshko dmlemeshko merged commit d850e33 into elastic:8.19 Aug 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants