@wdio/browserstack-service 9.33.2 → 9.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,19 @@ export declare class BStackLogger {
10
10
  static debug(message: string, param?: unknown): void;
11
11
  static warn(message: string): void;
12
12
  static trace(message: string): void;
13
+ /**
14
+ * Drain whatever is still sitting in the log stream's buffer onto disk.
15
+ *
16
+ * `logToFile` writes to an async `fs.WriteStream`, so a line logged immediately before the
17
+ * archive is built is very likely NOT in the file yet — the stream's `open` is async too,
18
+ * so early on the file may not exist at all. Anything that snapshots the log (the debug-log
19
+ * upload) must flush first or it ships a truncated copy.
20
+ *
21
+ * A zero-length write's callback fires only after every chunk queued ahead of it has been
22
+ * handed to the fs layer, which drains the buffer without ending the stream — unlike
23
+ * `clearLogger()`, logging continues to work afterwards.
24
+ */
25
+ static flushLogFile(timeoutMs?: number): Promise<void>;
13
26
  static clearLogger(): void;
14
27
  static clearLogFile(): void;
15
28
  static ensureLogsFolder(): void;