mholt/caddy-l4

Implement a log handler

Open

#279 opened on Dec 29, 2024

 (0 comments) (6 reactions) (0 assignees)Go (114 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (1,738 stars)
PR merge metrics
 (Avg merge 14d 19h) (7 merged PRs in 30d)

Description

I would like to be able to log within a route, like in the example below:

{
    layer4 {
        :443 {
            @example tls sni example.com
            route @example {
                proxy example.com:443
            }
            @example2 tls sni example2.com
            route @example2 {
                log {
                    level DEBUG
                    format ...
                }
                proxy example2.com:443
            }
        }
    }
}


I'm currently doing this logging within the global options block, but that applies it to all routes, making it unnecessarily excessive.

Contributor guide