Skip to content

Commit

Permalink
Fix log file path
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
code-asher committed Jun 21, 2024
1 parent c26ac35 commit d431c9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,10 @@ export class ParentProcess extends Process {
const opts = {
size: "10M",
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.logStderrStream = rfs.createStream(path.join(paths.data, "coder-logs", "code-server-stderr.log"), opts)
this.logStdoutStream = rfs.createStream("code-server-stdout.log", opts)
this.logStderrStream = rfs.createStream("code-server-stderr.log", opts)

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

Expand Down

0 comments on commit d431c9c

Please sign in to comment.