1. Caddy version (caddy version
):
2
2. How I run Caddy:
a. System environment:
b. Command:
I have this command
log {
level {$LOG_LEVEL:"info"}
output net udp/host.docker.internal:6000 {
dial_timeout 5s
}
}
i want to use the syslog://host[:port] to write via UDP to a local or remote syslog server
see url https://caddy.its-em.ma/v1/docs/log
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
# Global
{
# Debug
{$DEBUG}
#auto_https off
}
# define single site using environment variable
{$SERVER_NAME}
# customisable log level with environment
#log {
# level {$LOG_LEVEL:"info"}
#}
log {
level {$LOG_LEVEL:"info"}
output net udp/host.docker.internal:6000 {
dial_timeout 5s
}
}
encode gzip
# preserve orders
route {
root * /srv/api/public
# Disable Google FLOC tracking if not enabled explicitly: https://plausible.io/blog/google-floc
#header ?Permissions-Policy "interest-cohort=()"
# If basicauth success, put the username in this header
#header Authorization-Application "{http.auth.user.id}"
php_fastcgi unix//var/run/php/php-fpm.sock
encode zstd gzip
file_server
}
3. The problem I’m having:
I need to use de Syslog UDP but i don’t see any document about that on the v2 of caddy
4. Error messages and/or full log output:
5. What I already tried:
6. Links to relevant resources:
here in the caddy v1 doc we have that
https://caddy.its-em.ma/v1/docs/log