Skip to content

Commit

Permalink
escape CRLF for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
linyows committed May 8, 2021
1 parent 1301510 commit 07f3fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (p *Pipe) copy(dr Direction, fn Mediator) (written int64, err error) {

func (p *Pipe) cmd(format string, args ...interface{}) error {
cmd := fmt.Sprintf(format+crlf, args...)
log.Printf("|> %s", cmd)
log.Printf("|> %s", p.escapeCRLF([]byte(cmd)))
_, err := p.rConn.Write([]byte(cmd))
if err != nil {
return err
Expand Down

0 comments on commit 07f3fd4

Please sign in to comment.