Spec-Zone.ru › Caddy

log_skip

Skips access logging for matched requests.

This should be used alongside the log directive to skip logging requests that are not relevant for your needs.

Prior to v2.8.0, this directive was named skip_log, but was renamed for consistency with other directives.

Syntax

log_skip [<matcher>]

Examples

Skip access logging for static files stored in a subpath:

example.com {
	root * /srv
	log
	log_skip /static*
	file_server
}

Skip access logging for requests matching a pattern; in this case, for files with particular extensions:

@skip path_regexp \.(js|css|png|jpe?g|gif|ico|woff|otf|ttf|eot|svg|txt|pdf|docx?|xlsx?)$
log_skip @skip

The matcher is not needed if it's found within a route which is already within a matcher. For example with a handle for a file server for a particular subpath:

handle_path /static* {
	root * /srv/static
	log_skip
	file_server
}

© 2015-2025 Matthew Holt and The Caddy Authors
Licensed under the Apache License 2.0.
Caddy is a registered trademark of Stack Holdings GmbH.
https://caddyserver.com/docs/caddyfile/directives/log_skip

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API