Monviech / os-caddy-plugin

Caddy Plugin with GUI for OPNsense
Other
38 stars 0 forks source link

Logging view #33

Closed Monviech closed 9 months ago

Monviech commented 9 months ago

Added a simple log view to the UI. Since Caddy can't use a unix socket based syslogger, and I didn't want to write a script that uses logger to the syslog, this is the next best thing.

It implements a new API endpoint /api/caddy/log/get which can also be called with configctl caddy showlog.

The log file size has been adjusted to 10Mib, because that prevents the web interface from getting slow when the log is being loaded.

The log file can be searched, reloaded and the maximum line count is 1000 in the GUI. It can't be cleared in the GUI because I don't want weird things to happen.

Monviech commented 9 months ago

Has been tested on my Firewall and nothing crashed so I think it's alright to merge to main