You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to disable file logging of a program, but be able to see the output in foreground (supervisorctl fg <program>)? I tried setting stdout_logfile=/dev/null, but the output didn't show in foreground.
That feature would come in handy if, for example, I don't want to keep the logs, but want to see what is going on at the moment.
The text was updated successfully, but these errors were encountered:
Nothing need to do, just keep the default value of stdout_logfile, then supervisorctl tail -f <program>to see what is going on at the moment.
For your another need: " I don't want to keep the logs", you'll find log file in /tmp/ if you keep stdout_logfile default. Usually the /tmp/ path is mounting by tmpfs (https://en.wikipedia.org/wiki/Tmpfs), so…… would you like it?
@cupen what you basically suggested is to store log files in /tmp directory. That's not what I asked.
Moreover, /tmp/ is not a default directory for log files in supervisor, and it's a bad piece of advice to store logs on tmpfs as it occupies RAM space.
Is it possible to disable file logging of a program, but be able to see the output in foreground (supervisorctl fg )?
No, as internally the fg command uses the same mechanism as the tail command, which reads the log from the disk. You can set stdout_logfile_maxbytes to a low number (say, 1K) and stdout_logfile_backups to 0 to prevent it from using much space. It would take a lot of effort to change how fg works. We are unlikely to change this since a workaround exists, sorry.
Is it possible to disable file logging of a program, but be able to see the output in foreground (
supervisorctl fg <program>
)? I tried settingstdout_logfile=/dev/null
, but the output didn't show in foreground.That feature would come in handy if, for example, I don't want to keep the logs, but want to see what is going on at the moment.
The text was updated successfully, but these errors were encountered: