code: func NewLogActionFn(ctx RuleContext) interface{} {
  	l := &LogAction{ctx: ctx}
  	writer, ok := ctx.(io.Writer)
  	if ok && writer != nil {
  		l.writer = writer
  	}
  	return l.Log
  }
docs: // NewLogActionFn creates logger functions