add log
This commit is contained in:
parent
e7a85e5e00
commit
b015a3e8e2
12 changed files with 116 additions and 63 deletions
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue