Fix log file path

The first argument is a file name, not a path.  When the log gets
rotated it prepends the date which ends up creating a path in the
current working directory.
This commit is contained in:
Asher 2024-06-21 09:45:23 -08:00
parent c26ac35b25
commit d431c9cd9d
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 3 additions and 2 deletions

View File

@ -248,9 +248,10 @@ export class ParentProcess extends Process {
const opts = { const opts = {
size: "10M", size: "10M",
maxFiles: 10, maxFiles: 10,
path: path.join(paths.data, "coder-logs"),
} }
this.logStdoutStream = rfs.createStream(path.join(paths.data, "coder-logs", "code-server-stdout.log"), opts) this.logStdoutStream = rfs.createStream("code-server-stdout.log", opts)
this.logStderrStream = rfs.createStream(path.join(paths.data, "coder-logs", "code-server-stderr.log"), opts) this.logStderrStream = rfs.createStream("code-server-stderr.log", opts)
this.onDispose(() => this.disposeChild()) this.onDispose(() => this.disposeChild())