aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest/integration/caddyfile_adapt/log_add.caddyfiletest
diff options
context:
space:
mode:
Diffstat (limited to 'caddytest/integration/caddyfile_adapt/log_add.caddyfiletest')
-rw-r--r--caddytest/integration/caddyfile_adapt/log_add.caddyfiletest71
1 files changed, 71 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/log_add.caddyfiletest b/caddytest/integration/caddyfile_adapt/log_add.caddyfiletest
new file mode 100644
index 000000000..4f91e4644
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/log_add.caddyfiletest
@@ -0,0 +1,71 @@
+:80 {
+ log
+
+ vars foo foo
+
+ log_append const bar
+ log_append vars foo
+ log_append placeholder {path}
+
+ log_append /only-for-this-path secret value
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ],
+ "routes": [
+ {
+ "handle": [
+ {
+ "foo": "foo",
+ "handler": "vars"
+ }
+ ]
+ },
+ {
+ "match": [
+ {
+ "path": [
+ "/only-for-this-path"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "log_append",
+ "key": "secret",
+ "value": "value"
+ }
+ ]
+ },
+ {
+ "handle": [
+ {
+ "handler": "log_append",
+ "key": "const",
+ "value": "bar"
+ },
+ {
+ "handler": "log_append",
+ "key": "vars",
+ "value": "foo"
+ },
+ {
+ "handler": "log_append",
+ "key": "placeholder",
+ "value": "{http.request.uri.path}"
+ }
+ ]
+ }
+ ],
+ "logs": {}
+ }
+ }
+ }
+ }
+}