Skip to content

Commit

Permalink
fix access log
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Feb 23, 2024
1 parent a9c94bc commit b4bef1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ bash ./start.sh
配置文件应为**运行目录**下的`config.yaml`文件, 使用`yaml`格式解析
例:
```yaml
# 是否打印访问信息, 默认为否 (这个选项对于压缩日志文件十分有用)
record-serve-info: false
# 是否不打印访问信息
no-access-log: false
# 最多输出几个 1MB 的访问日志
access-log-slots: 16
# 日志最长保存时间 (天). 设置为 0 禁用清理过期日志
log-slots: 7
# 是否禁用 bmclapi 分发的证书, 同 CLUSTER_BYOC
Expand Down
11 changes: 8 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
record-serve-info: true
log-slots: 7
no-access-log: false
access-log-slots: 16
byoc: false
trusted-x-forwarded-for: false
public-host: ""
Expand All @@ -17,6 +18,8 @@ serve-limit:
upload-rate: 10240
dashboard:
enable: true
username: ""
password: ""
pwa-name: GoOpenBmclApi Dashboard
pwa-short_name: GOBA Dash
pwa-description: Go-Openbmclapi Internal Dashboard
Expand All @@ -34,8 +37,10 @@ webdav-users:
password: example-password
advanced:
debug-log: false
skip-first-sync: true
exit-when-disconnected: true
noopen: false
no-heavy-check: false
heavy-check-interval: 120
keepalive-timeout: 10
skip-first-sync: false
skip-signature-check: false
exit-when-disconnected: false
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type accessRecord struct {
Method string `json:"method"`
URI string `json:"uri"`
UA string `json:"ua"`
Extra map[string]any `json:"extra"`
Extra map[string]any `json:"extra,omitempty"`
}

func (r *accessRecord) String() string {
Expand Down

0 comments on commit b4bef1b

Please sign in to comment.