make logger switchable and adapted project
You can import spoor
using:
import (
"github.com/phuhao00/spoor"
)
Then use one of the helpers below:
fileWriter := spoor.NewFileWriter("log", 0, 0, 0)
l := spoor.NewSpoor(spoor.DEBUG, "", log.Ldate|log.Ltime|log.Lmicroseconds|log.Llongfile, spoor.WithFileWriter(fileWriter))
l.DebugF("hhhh")
select {}
l := NewSpoor(DEBUG, "", log.Ldate|log.Ltime|log.Lmicroseconds|log.Llongfile, WithNormalWriter(os.Stdout))
l.DebugF("hhhh")