EnableDumpAllToFile enable dump for requests fired from the client and output to the specified file.
(filename string)
| 610 | // EnableDumpAllToFile enable dump for requests fired from the |
| 611 | // client and output to the specified file. |
| 612 | func (c *Client) EnableDumpAllToFile(filename string) *Client { |
| 613 | file, err := os.Create(filename) |
| 614 | if err != nil { |
| 615 | c.log.Errorf("create dump file error: %v", err) |
| 616 | return c |
| 617 | } |
| 618 | c.getDumpOptions().Output = file |
| 619 | c.EnableDumpAll() |
| 620 | return c |
| 621 | } |
| 622 | |
| 623 | // EnableDumpAllTo enable dump for requests fired from the |
| 624 | // client and output to the specified io.Writer. |