These are chat archives for sbt/sbt-web

Aug 2015
Muayad Sayed ALi
Aug 11 2015 09:06

When the application.log file is getting big, i'm getting this error from SBT:
RuntimeException: Could not copy '/var/lib/my-application/saas/public/frontend-app/app/dist/client_app/application.log' to '/var/lib/my-application/saas/target/web/public/main/frontend-app/app/dist/client_app/application.log' (32970332/32971270 bytes copied)

Somehow SBT is trying to copy/move the application.log file, Any Idea guys?

I’m adding application.log inside the public folder as link and exists in the folder in order to reach it from outside without changing rules in route file
Josh Suereth
Aug 11 2015 11:53

@GoldenZero That error is occurring because the log file is being written to by some process AND you're trying to copy it into the dist at the same time.

a. I do not recommend copying a stale log file from your machine into the dist
b. THe link to the public folder is the issue. When sbt copies files to the distribution it copies the underlying file, not relative symlinks. IF you need to see your log file from the outside, you should set up a controller to serve it, rather than moving it into public (which only works in dev mode, probably won't work as you desire in prod.)