air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.39k stars 772 forks source link

Weird character during running phase #502

Open laupse opened 7 months ago

laupse commented 7 months ago

When air is running the binary, those character ^[[20;1R^[[20;9R (escape string ?) appears followed by some of my code execution (debugging println) and then those character again. And finnally the normal execution of code goes on. I made a video and it is not edited

https://github.com/cosmtrek/air/assets/98523125/f5115830-a0cd-4247-92dc-e0e59cc0df9a

It really slows down the reloading

This behavior does not appears when running the binary manually ./tmp/main This behavior only appears on one specific project (link soon) This behavior apperas from version 1.45 to 1.49

laupse commented 7 months ago

I have isolated the root cause. It's because of use of this logging library https://github.com/charmbracelet/log

You can reproduce whis this file

package main

import (
    "os"

    "github.com/charmbracelet/log"
)

func main() {
    log.NewWithOptions(os.Stdout, log.Options{})
    log.Info("test")
}