Skip to content

Commit 64536d7

Browse files
committed
export supervisor, credential helper and docker up logs
1 parent f69939a commit 64536d7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/commands/logs.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,25 @@ export class ExportLogsCommand implements Command {
7878
}
7979
}
8080

81+
for (const logFilePath of [
82+
'/tmp/gitpod-git-credential-helper.log',
83+
'/var/log/gitpod/supervisor.log',
84+
'/workspace/.gitpod/logs/docker-up.log'
85+
]) {
86+
try {
87+
const logFileUri = vscode.Uri.file(logFilePath).with({ scheme: "vscode-remote" });
88+
const fileContent = await vscode.workspace.fs.readFile(logFileUri)
89+
if (fileContent.byteLength > 0) {
90+
remoteLogFiles.push({
91+
path: path.posix.join('./remote', path.posix.basename(logFileUri.path)),
92+
contents: Buffer.from(fileContent)
93+
});
94+
}
95+
} catch {
96+
// no-op
97+
}
98+
}
99+
81100
const localLogFiles: IFile[] = [];
82101
await traverseFolder(localLogsUri, localLogFiles, token);
83102
localLogFiles.forEach(file => file.path = path.posix.join('./local', path.posix.relative(localLogsUri.path, file.path)));

0 commit comments

Comments
 (0)