Skip to content

Commit 5a651b4

Browse files
committed
logs: add logs to zip stream process
1 parent c3d1c8a commit 5a651b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/shared/utilities/zipStream.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class ZipStream {
5959
boundFileStartCallback: (computedSize: number) => Promise<void>
6060

6161
constructor(props: Partial<ZipStreamProps> = {}) {
62+
getLogger().debug('Initializing ZipStream with props: %O', props)
6263
// Allow any user-provided values to override default values
6364
const mergedProps = { ...defaultProps, ...props }
6465
const { hashAlgorithm, compressionLevel, maxNumberOfFileStreams } = mergedProps
@@ -157,8 +158,10 @@ export class ZipStream {
157158
// We're done streaming all files, so we can close the zip stream
158159

159160
await this._zipWriter.close()
161+
const sizeInBytes = this._streamBuffer.size()
162+
getLogger().debug('Finished finalizing zipStream with %d bytes of data', sizeInBytes)
160163
return {
161-
sizeInBytes: this._streamBuffer.size(),
164+
sizeInBytes,
162165
hash: this._hasher.digest('base64'),
163166
streamBuffer: this._streamBuffer,
164167
}

0 commit comments

Comments
 (0)