-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
httpcaddyfile: Allow
hostnames
override for log directive
- Loading branch information
1 parent
f857b32
commit 7c2cf6f
Showing
3 changed files
with
104 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
caddytest/integration/caddyfile_adapt/log_override_hostname.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
*.example.com { | ||
log { | ||
hostnames foo.example.com bar.example.com | ||
output file /foo-bar.txt | ||
} | ||
log { | ||
hostnames baz.example.com | ||
output file /baz.txt | ||
} | ||
} | ||
---------- | ||
{ | ||
"logging": { | ||
"logs": { | ||
"default": { | ||
"exclude": [ | ||
"http.log.access.log0", | ||
"http.log.access.log1" | ||
] | ||
}, | ||
"log0": { | ||
"writer": { | ||
"filename": "/foo-bar.txt", | ||
"output": "file" | ||
}, | ||
"include": [ | ||
"http.log.access.log0" | ||
] | ||
}, | ||
"log1": { | ||
"writer": { | ||
"filename": "/baz.txt", | ||
"output": "file" | ||
}, | ||
"include": [ | ||
"http.log.access.log1" | ||
] | ||
} | ||
} | ||
}, | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":443" | ||
], | ||
"routes": [ | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"*.example.com" | ||
] | ||
} | ||
], | ||
"terminal": true | ||
} | ||
], | ||
"logs": { | ||
"logger_names": { | ||
"bar.example.com": "log0", | ||
"baz.example.com": "log1", | ||
"foo.example.com": "log0" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |