wrfly / container-web-tty

Connect your containers via a web-tty
https://container-web-tty.kfd.me/
Apache License 2.0
246 stars 45 forks source link

[bug] mess logs #20

Closed wrfly closed 4 years ago

wrfly commented 5 years ago

13=\r 10=\n

some logs only have \n, need to insert a \r

{"log":"[2018-09-18T01:28:00,006][INFO ][o.e.x.m.MlDailyMaintenanceService] Successfully completed [ML] maintenance tasks\r\n","stream":"stdout","time":"2018-09-18T01:28:00.006751949Z"}

{"log":"time=\"2018-09-18T03:36:30Z\" level=info msg=\"Warm up containers info...\"\n","stream":"stderr","time":"2018-09-18T03:36:30.82042848Z"}
wrfly commented 5 years ago

https://github.com/wrfly/container-web-tty/blob/149d0514791d388cb697c528d2ffa684565b95a6/route/slave_wrapper.go#L47-L50

wrfly commented 5 years ago

need to check bs[n-2] == 13, if not, insert a \r

wrfly commented 5 years ago
image

I have no idea where the beginning characters come from