Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"sbt run" writes all screen output in temp file of GB size, which also gets not deleted #1913

Open
gerdriesselmann opened this issue Mar 11, 2015 · 4 comments
Labels

Comments

@gerdriesselmann
Copy link

When I run an application with

sbt project/run

all log output from the screen gets written into a file like

/tmp/sbt12345678990.log

If an application runs for longer, say an hour or two, e.g. because it is web server, such a file easily exceed several GB. Since space in /tmp is limited, this makes my system crash or behave unpredictably.

I would expect to have a setting to prevent the file from beeing written, but could not find any.

To make things worse, the file gets not deleted when I stop "sbt run" by pressing Ctrl + C.

I would expect temporary files to be cleaned after termination.

The system is Ubuntu 14.04, and the behavior occurs with both sbt 0.13.5 and sbt 0.13.7. I did not try 0.13.6.

@jsuereth
Copy link
Member

I'm marking this as an enhancement for now, although one with higher priority than most.

Basically, we're pretty silly with files right now, and we don't do rolling writes. We literally try to save the logs and be able to conjure them up later. The fact it's not deleted and it's so large is an issue. This should be configurable, and logging in sbt, generally is an area that needs improvement.

@gerdriesselmann
Copy link
Author

Thank you!

A cron job with

*/5 * * * * /bin/rm /tmp/sbt*.log

works as a workaround, and I'm fine with this for now

@liebichw
Copy link

Is there anything planned on changing this within SBT? I have /tmp mounted on a separate partition, and it sometimes happens that this partition fills up due to SBT log files.

For now I did not find a way to turn down at least the log level of what goes into these files.
99% of the time I do not need debug logs

@retronym
Copy link
Member

retronym commented Mar 21, 2018

As of SBT 1.0.4 / #3717, sbt 'set persistLogLevel in ThisBuild := Level.Info' .. seems to filter debug log entries from that file.

@eed3si9n eed3si9n added the uncategorized Used for Waffle integration label Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants