Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planned change to Caddy's access logging #2220

Closed
francislavoie opened this issue Nov 1, 2021 · 9 comments · Fixed by #2293
Closed

Planned change to Caddy's access logging #2220

francislavoie opened this issue Nov 1, 2021 · 9 comments · Fixed by #2293

Comments

@francislavoie
Copy link

This is part question, part "notice".

In caddyserver/caddy#4403, we're planning on splitting up remote_addr into two fields, remote_ip and remote_port. The change is still pending, and the field names may change before merging.

I wanted to ask if it's possible/easy to support both remote_addr and remote_ip at the same time in GoAccess, so that it wouldn't be dependent on the version of Caddy?

@allinurl
Copy link
Owner

allinurl commented Nov 1, 2021

Thanks for checking on this. Just so I understand a bit better, there would be a remote_addr property and a remote_port property instead of having both on the same field? e.g.,

from

{"level":"info","ts":1609440464.1045835,"logger":"http.log.access.log0","request":{"remote_addr":"10.0.2.2:59722" ...}

to

{"level":"info","ts":1609440464.1045835,"logger":"http.log.access.log0","request":{"remote_addr":"10.0.2.2", "remote_port": 59722 ...}

@francislavoie
Copy link
Author

Likely remote_addr will go away, and be replaced with remote_ip and remote_port. Still TBD on the field names. The port will be a string (quoted).

@allinurl
Copy link
Owner

allinurl commented Nov 1, 2021

I see. There shouldn't be a problem and actually as pointed on 4403, handling IPv6 without the port on it, would be much easier for goaccess too.

@francislavoie
Copy link
Author

francislavoie commented Mar 9, 2022

FYI these changes have been released in https://github.com/caddyserver/caddy/releases/tag/v2.5.0-beta.1

@allinurl
Copy link
Owner

Thanks for sharing this. Do you have an ETA for the production release? I'm thinking it may be best to do the switch on goaccess' format when Caddy reaches the stable release.

@francislavoie
Copy link
Author

We don't really have a schedule, we usually just cut the release when it "feels good". If we don't get much feedback, we might just make the stable release.

Maybe you could set up a PR in the meantime so you just need to click merge when the time comes? 🤷‍♂️

But yeah, I'll let you know when stable is released. Or if you like, you can subscribe to releases on the Caddy repo in github (Watch button etc).

allinurl added a commit that referenced this issue Mar 15, 2022
This should adddress CADDY's v2.5.0 change where the remote port has its own
JSON property.

Fixes #2220
@allinurl
Copy link
Owner

Got it. I just subscribed to Caddy's releases. Yes, please feel free to let me know in case I miss it. PR is ready. Thanks again, Francis!

@mholt
Copy link

mholt commented Mar 15, 2022

Thanks so much for your ongoing maintenance, @allinurl ! We appreciate it!

@allinurl
Copy link
Owner

@mholt No, thank you guys for letting me know about these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants