kobo / groovyserv

Groovy's startup acceralator.
http://kobo.github.io/groovyserv/
Other
98 stars 10 forks source link

Make logfile configurable #58

Closed itegebo closed 10 years ago

itegebo commented 10 years ago

It looks like the logfile path is hardcoded here. It'd be nice if it could be made configurable via a system property. If not, perhaps a FAQ entry or notice somewhere in the docs. If I missed either, apologies.

nobeans commented 10 years ago

The location of a log file path is already there:

Besides, do you want it to be configurable? (e.g. /var/log/groovyserv/<port>.log?)

nobeans commented 10 years ago

I've just written /var/log/groovyserv/<port>.log. But it's required a root permission. So it doesn't seem working in fact.

itegebo commented 10 years ago

I meant to say, "if the fact that it's not configurable isn't mentioned somewhere in the docs".

The use case is for deploying to a production environment where a user's home directly isn't an appropriate place for log files (or other state related to a server). In that view, one may also want to change the data directory, specify a PID file, etc.

Re: "root permission" - that's fine, system administrator's can chmod/chown as appropriate.

BTW, thanks for looking into it.

nobeans commented 10 years ago

I meant to say, "if the fact that it's not configurable isn't mentioned somewhere in the docs".

OK, I got you.

BTW, I've just remembered a GROOVYSERV_WORK_DIR environment variable which is for changing the directory but it's undocumented. So I tried it, but unexpectedly it doesn't work because it's only used to create PID file and not for other else.

So I'll fix the unexpected behavior and write it to a user guide. Thank you for your report.

nobeans commented 10 years ago

I added GROOVYSERV_LOG_DIR to change the log directory. You can use it at the next version.

f73e7362d1197293096aa57acbd714bd236a7596