mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-23 04:44:26 +00:00
writes log
This commit is contained in:
parent
1c4427af53
commit
70a264ed00
@ -1,6 +1,6 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
func FormatWriteLog(line *[]byte) (log string) {
|
func FormatWritesLog(line *[]byte) (log string) {
|
||||||
ascii := map[byte]string{
|
ascii := map[byte]string{
|
||||||
0: "NUL",
|
0: "NUL",
|
||||||
1: "SOH",
|
1: "SOH",
|
||||||
|
@ -195,7 +195,7 @@ func (wt *WebTTY) handleMasterReadEvent(data []byte, line *[]byte) error {
|
|||||||
return errors.Wrapf(err, "failed to marshal arguments map")
|
return errors.Wrapf(err, "failed to marshal arguments map")
|
||||||
}
|
}
|
||||||
//log.Printf("[wlog] %v\n", line)
|
//log.Printf("[wlog] %v\n", line)
|
||||||
log.Printf("[wlog] %s %s\n", utils.FormatWriteLog(line), string(argumentsByte))
|
log.Printf("[wlog] %s %s\n", utils.FormatWritesLog(line), string(argumentsByte))
|
||||||
*line = nil
|
*line = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user