This commit is contained in:
JMARyA 2024-02-12 21:55:34 +01:00
parent e7a85e5e00
commit b015a3e8e2
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
12 changed files with 116 additions and 63 deletions

View file

@ -82,7 +82,7 @@ server:
enable_expvars: false
## Log Configuration
## [Log](../../dev/Log.md) Configuration
log:
## Level of verbosity for logs: info, debug, trace.
level: debug

View file

@ -33,15 +33,15 @@ Usage: `dufs [OPTIONS] [serve-path]`
| `-a, --auth <rules>` | Add auth roles, e.g. `user:pass@/dir1:rw,/dir2` |
| `-A, --allow-all` | Allow all operations |
| `--allow-upload` | Allow upload files/folders |
| `--allow-delete` | Allow delete files/folders |
| `--allow-delete` | Allow delete files/folders |
| `--allow-search` | Allow search files/folders |
| `--allow-symlink` | Allow symlink to files/folders outside root directory |
| `--allow-archive` | Allow [zip](../../files/ZIP.md) archive generation |
| `--allow-archive` | Allow [zip](../../files/ZIP.md) archive generation |
| `--enable-cors` | Enable CORS, sets `Access-Control-Allow-Origin: *` |
| `--render-index` | Serve `index.html` when requesting a directory, returns 404 if not found `index.html` |
| `--render-try-index` | Serve `index.html` when requesting a directory, returns directory listing if not found `index.html` |
| `--assets <path>` | Set the path to the assets directory for overriding the built-in assets |
| `--log-format <format>` | Customize [http](../../internet/HTTP.md) log format |
| `--log-format <format>` | Customize [http](../../internet/HTTP.md) log format |
| `--tls-cert <path>` | Path to an SSL/TLS certificate to serve with HTTPS |
| `--tls-key <path>` | Path to the SSL/TLS certificate's private key |
@ -87,11 +87,11 @@ The log format can use following variables.
| -------------- | ----------------------------------------------------------------------------- |
| `$remote_addr` | client address |
| `$remote_user` | user name supplied with authentication |
| `$request` | full original request line |
| `$status` | response status |
| `$request` | full original request line |
| `$status` | response status |
| `$http_` | arbitrary request header field. examples: `$http_user_agent`, `$http_referer` |
The default log format is `'$remote_addr "$request" $status'`.
The default [log](../../dev/Log.md) format is `'$remote_addr "$request" $status'`.
```
2022-08-06T06:59:31+08:00 INFO - 127.0.0.1 "GET /" 200
```

View file

@ -723,7 +723,7 @@ accessLog: {}
```
- `filePath`:
By default access logs are written to the standard output. To write the logs into a log file, use the `filePath` option.
By default access logs are written to the standard output. To write the logs into a [log file](../../dev/Log.md), use the `filePath` option.
```yaml
accessLog:
filePath: "/path/to/access.log"