View definition

(*ProxyCtx).Warnf

Defined in github.com/elazarl/goproxy/ctx.go

Description

Warnf prints a message to the proxy's log. Should be used in a ProxyHttpServer's filter This message will always be printed.

proxy.OnRequest().DoFunc(func(r *http.Request,ctx *goproxy.ProxyCtx) (*http.Request, *http.Response){
	f,err := os.OpenFile(cachedContent)
	if err != nil {
		ctx.Warnf("error open file %v: %v",cachedContent,err)
		return r, nil
	}
	return r, nil
})

Warnf is referenced in 5 repositories

github.com/elazarl/goproxy github.com/pmezard/adblock github.com/xlvector/cproxy

...