Open arthurwozniak opened 3 days ago
In Kamal 1 we used the logging options from the app config for the proxy. But that's not something that we want to do anymore since Kamal 2 supports running multiple apps through one proxy so the apps could have conflicting settings.
If you are only deploying one app though to a server, that's not a concern and you can use kamal proxy boot_config set -y
in a pre-deploy hook to force the servers to have the right settings.
RIght now though it will always try to set a max-size, so that's a bug since it's breaking things for the syslog driver.
kamal proxy boot_config set
@djmb Thanks! Your fix combined with pre-proxy-reboot
hook will solve points Compliance with logging.driver
and Passing custom docker options to proxy
.
Hi there!
I recently attempted to migrate from
kamal
version1.9.1
to2.2.2
and encountered a couple of issues that require some workaround configurations forkamal
andrsyslog
to maintain the original behavior.1. Compliance with
logging.driver
It seems that the container running
kamal-proxy
is not utilizing the specifiedlogging.driver
configuration (if set) and is instead writing logs to a file. This change is unexpected, astraefik
adhered to the logging driver specified in the configuration.Current Configuration:
2. Passing custom docker options to proxy
To address the logging issue, I attempted to set docker options using the
boot_config
command.However, I encountered an error:
It appears that Kamal internally sets the
max-size
option, which conflicts with the syslog log driver. This can be resolved by manually editing.kamal/proxy/options
on host to remove--log-opt max-size=10m
.3. Definition of unwanted log fields
Another useful feature would be the ability to specify fields to exclude from log entries. Currently, the log entries contain many fields that may not be necessary for certain use cases, such as:
Since we can already define
proxy.logging.request_headers
andproxy.logging.response_headers
, I suggest adding aproxy.logging.dropped_fields
array for this purpose.Fields can be filtered out in the rsyslog configuration, but this introduces significant complexity to what is otherwise a straightforward tool.
However, this is likely a feature request for the
kamal-proxy
repo as logging is handled there.Thank you for your hard work on this project! Keep rolling! 🚀 💪