Conversation
|
Looks good except I am not seeing the log file. Troubleshooting it now. |
vnprc
left a comment
There was a problem hiding this comment.
Can you update withLogging so that all processes log to console and to a log file?
My LLM suggests this change. I haven't tested it so it's probably broken but this should get you started.
✅ Updated withLogging that works with forking processes:
withLogging = command: logFile:
''
mkdir -p ${config.devenv.root}/logs
${command} 2>&1 | stdbuf -oL tee -a ${config.devenv.root}/logs/${logFile}
'';
Key changes:
No bash -c
Runs the command directly, piping into tee
stdbuf is now only on tee, where it’s effective even after fork
devenv.nix
Outdated
|
|
||
| # https://devenv.sh/processes/ | ||
| processes = { | ||
| redis = { |
There was a problem hiding this comment.
Apparently redis forks on startup and this doesn't play nicely with the bash -c command in the withLogging function.
|
I revised |
|
Excellent! |
Part of #36: add redis process to devenv.nix
Run these commands to verify redis working. redis process should appear.
You can also open another terminal and run
devenv shell. It will show a list of running processes. Then you can runredis-clicommandsredis-cli pingredis-cli info serverredis-cli set test "hello world" && redis-cli get test