aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2023-10-17 01:57:03 -0400
committerGitHub <[email protected]>2023-10-16 23:57:03 -0600
commitac1f20b9e470425c1a67939d37883c03175bd827 (patch)
treef5f13083fab50f02ad0f908e909eb0b6eec2dc98 /caddytest
parent174c19a9539443e6651eecf23ab86c7fd5d8c293 (diff)
downloadcaddy-ac1f20b9e470425c1a67939d37883c03175bd827.tar.gz
caddy-ac1f20b9e470425c1a67939d37883c03175bd827.zip
httpcaddyfile: Remove port from logger names (#5881)
Co-authored-by: Matt Holt <[email protected]>
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt2
-rw-r--r--caddytest/integration/caddyfile_adapt/log_override_hostname.txt40
-rw-r--r--caddytest/integration/caddyfile_adapt/log_override_name_multiaccess.txt2
-rw-r--r--caddytest/integration/caddyfile_adapt/log_override_name_multiaccess_debug.txt2
4 files changed, 42 insertions, 4 deletions
diff --git a/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt
index ed3b20de4..6fbc6c7c8 100644
--- a/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt
+++ b/caddytest/integration/caddyfile_adapt/log_except_catchall_blocks.txt
@@ -99,7 +99,7 @@ http://localhost:2020 {
},
"logs": {
"logger_names": {
- "localhost:2020": ""
+ "localhost": ""
},
"skip_unmapped_hosts": true
}
diff --git a/caddytest/integration/caddyfile_adapt/log_override_hostname.txt b/caddytest/integration/caddyfile_adapt/log_override_hostname.txt
index 4511fd494..c36ba23f8 100644
--- a/caddytest/integration/caddyfile_adapt/log_override_hostname.txt
+++ b/caddytest/integration/caddyfile_adapt/log_override_hostname.txt
@@ -8,6 +8,12 @@
output file /baz.txt
}
}
+
+example.com:8443 {
+ log {
+ output file /port.txt
+ }
+}
----------
{
"logging": {
@@ -15,7 +21,8 @@
"default": {
"exclude": [
"http.log.access.log0",
- "http.log.access.log1"
+ "http.log.access.log1",
+ "http.log.access.log2"
]
},
"log0": {
@@ -35,6 +42,15 @@
"include": [
"http.log.access.log1"
]
+ },
+ "log2": {
+ "writer": {
+ "filename": "/port.txt",
+ "output": "file"
+ },
+ "include": [
+ "http.log.access.log2"
+ ]
}
}
},
@@ -64,6 +80,28 @@
"foo.example.com": "log0"
}
}
+ },
+ "srv1": {
+ "listen": [
+ ":8443"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "host": [
+ "example.com"
+ ]
+ }
+ ],
+ "terminal": true
+ }
+ ],
+ "logs": {
+ "logger_names": {
+ "example.com": "log2"
+ }
+ }
}
}
}
diff --git a/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess.txt b/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess.txt
index a3b0cec63..d48857a2d 100644
--- a/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess.txt
+++ b/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess.txt
@@ -76,7 +76,7 @@ http://localhost:8881 {
},
"logs": {
"logger_names": {
- "localhost:8881": "foo"
+ "localhost": "foo"
}
}
}
diff --git a/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess_debug.txt b/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess_debug.txt
index e6698e4fb..d024dc386 100644
--- a/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess_debug.txt
+++ b/caddytest/integration/caddyfile_adapt/log_override_name_multiaccess_debug.txt
@@ -81,7 +81,7 @@ http://localhost:8881 {
},
"logs": {
"logger_names": {
- "localhost:8881": "foo"
+ "localhost": "foo"
}
}
}