Skip to content

Commit 2000ae3

Browse files
committed
Add ~/.agenthub.log as log
1 parent 7b59436 commit 2000ae3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/agenthub

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@ function start(configPath) {
132132
}
133133

134134
var appid = cfg.appid;
135-
var proc = spawn(agenthubBin, [configPath], {detached: true});
135+
const logPath = path.join(os.homedir(), '.agenthub.log');
136+
const out = fs.openSync(logPath, 'a');
137+
const err = fs.openSync(logPath, 'a');
138+
const proc = spawn(agenthubBin, [configPath], {
139+
detached: true,
140+
stdio: ['ipc', out, err]
141+
});
136142
console.log('agenthub has started(pid: %s).', proc.pid);
137143
appendAgenthubStatus(appid, proc.pid, configPath);
138144
process.exit(0);

0 commit comments

Comments
 (0)