-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WDIOService logs to file and upload to server #11580
WDIOService logs to file and upload to server #11580
Conversation
@@ -1120,3 +1133,26 @@ export async function pushDataToQueue(data: UploadType, requestQueueHandler: Req | |||
} | |||
|
|||
export const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms)) | |||
|
|||
export async function uploadLogs(user: string | undefined, key: string | undefined, clientBuildUuid: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the request actually succeeding if no user
and key
is provided? if you only allow undefined
so it doesn't throw a type issue I recommend to have something like:
if (user && key) {
uploadLogs(...)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks a lot!
Proposed changes
Writing all the WDIOService logs to File and upload to the server.
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers