Skip to content

Commit d431c9c

Browse files
committed
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.
1 parent c26ac35 commit d431c9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/node/wrapper.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,10 @@ export class ParentProcess extends Process {
248248
const opts = {
249249
size: "10M",
250250
maxFiles: 10,
251+
path: path.join(paths.data, "coder-logs"),
251252
}
252-
this.logStdoutStream = rfs.createStream(path.join(paths.data, "coder-logs", "code-server-stdout.log"), opts)
253-
this.logStderrStream = rfs.createStream(path.join(paths.data, "coder-logs", "code-server-stderr.log"), opts)
253+
this.logStdoutStream = rfs.createStream("code-server-stdout.log", opts)
254+
this.logStderrStream = rfs.createStream("code-server-stderr.log", opts)
254255

255256
this.onDispose(() => this.disposeChild())
256257

0 commit comments

Comments
 (0)