Skip to content

logs.skip_hosts is ignored #6248

@Winand

Description

@Winand

Caddy 2.7.6 in Docker. Port forwarding: 80(host) -> 80(caddy), 2999(host) -> 443(caddy)

I have several domain names in Caddyfile, only one of them has log enabled.

domain1.com {
  ...
}
domain2.com {
  log
  ...
}
domain3.com {
  ...
}

In caddy adapt output I see that domain 1 and 3 are added to skip_hosts:

                    "logs": {
                        "logger_names": {
                            "domain2.com": ""
                        },
                        "skip_hosts": [
                            "domain1.com",
                            "domain3.com"
                        ]
                    },

But access log records for all three domains appear in docker logs caddy. Is it the expected behaviour?
Of course I can add skip_log to domains 1 and 3 but why skip_hosts does not disable logs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions