MCPcopy
hub / github.com/caddyserver/caddy / Provision

Method Provision

modules/logging/filewriter.go:161–171  ·  view source on GitHub ↗

Provision sets up the module

(ctx caddy.Context)

Source from the content-addressed store, hash-verified

159
160// Provision sets up the module
161func (fw *FileWriter) Provision(ctx caddy.Context) error {
162 // Replace placeholder in filename
163 repl := caddy.NewReplacer()
164 filename, err := repl.ReplaceOrErr(fw.Filename, true, true)
165 if err != nil {
166 return fmt.Errorf("invalid filename for log file: %v", err)
167 }
168
169 fw.Filename = filename
170 return nil
171}
172
173func (fw FileWriter) String() string {
174 fpath, err := caddy.FastAbs(fw.Filename)

Callers

nothing calls this directly

Calls 1

ReplaceOrErrMethod · 0.95

Tested by

no test coverage detected