https://github.com/liuzl/caddy-zlog
zlog is a log middleware for Caddy
https://github.com/liuzl/caddy-zlog
caddy caddy-log caddy-plugin
Last synced: 8 months ago
JSON representation
zlog is a log middleware for Caddy
- Host: GitHub
- URL: https://github.com/liuzl/caddy-zlog
- Owner: liuzl
- License: apache-2.0
- Created: 2018-07-03T05:19:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-04T23:56:01.000Z (over 6 years ago)
- Last Synced: 2024-12-25T20:26:14.188Z (over 1 year ago)
- Topics: caddy, caddy-log, caddy-plugin
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Caddy-zlog
## Overview
`zlog` is a log middleware for [Caddy](https://github.com/caddyserver/caddy), it's based on https://github.com/rs/zerolog and https://github.com/liuzl/filestore.
## Installation
Rebuild caddy as follows:
1. `git clone https://github.com/liuzl/caddy-zlog`
2. copy `caddy-zlog` to `github.com/caddyserver/caddy/caddyhttp/zlog`
3. add `_ "github.com/caddyserver/caddy/caddyhttp/zlog"` to file `github.com/caddyserver/caddy/caddyhttp/caddyhttp.go`
4. add `zlog` to the variable `directives` in file `github.com/caddyserver/caddy/caddyhttp/httpserver/plugin.go`
5. `cd github.com/caddyserver/caddy/caddy && go build`
## Caddyfile syntax
```
127.0.0.1 {
zlog {
log_dir ./server_zerolog
split_by hour
}
}
```