facebook / duckling

Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default log files are created even if different paths are provided via options

slabstone opened this issue · comments

Default log dir and files log/access.log and log/error.log are created even if different paths are provided via --access-log and --error-log options, leading to permission concerns.

duckling: log/error.log: openFile: permission denied (Permission denied)

This relates to #377, where logfile creation was disabled in case of --no-access-log and --no-error-log.

Reproducable on 7520daa:

$ ls
duckling-example-exe

$ ./duckling-example-exe --access-log=./a.log --error-log=./e.log
no port specified, defaulting to port 8000
Listening on http://0.0.0.0:8000
^C
Shutting down..

$ ls -R
.:
a.log  duckling-example-exe  e.log  log

./log:
access.log  error.log

Here both default and user-provided files are created.