facebook / facebook/duckling

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

Open
#720 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.3k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

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 https://github.com/facebook/duckling/pull/377, where logfile creation was disabled in case of `--no-access-log` and `--no-error-log`.

Reproducable on 7520daaeba28691cda8e1b5c3d946028a28fb64b:
```
$ 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.