1
0
mirror of https://github.com/sorenisanerd/gotty.git synced 2025-04-05 02:10:28 +00:00

writes log

This commit is contained in:
llaoj 2022-11-14 09:36:47 +08:00
parent 1c4427af53
commit 70a264ed00
2 changed files with 2 additions and 2 deletions
utils
webtty

@ -1,6 +1,6 @@
package utils
func FormatWriteLog(line *[]byte) (log string) {
func FormatWritesLog(line *[]byte) (log string) {
ascii := map[byte]string{
0: "NUL",
1: "SOH",

@ -195,7 +195,7 @@ func (wt *WebTTY) handleMasterReadEvent(data []byte, line *[]byte) error {
return errors.Wrapf(err, "failed to marshal arguments map")
}
//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
}