Simple helper to reuse the log-to-file function in the rest of our libs.
- Init the logger in your main function
import (
"github.com/bocha-io/logger"
)
...
// Log to file
file := logger.LogToFile("indexerlogs.txt")
defer file.Close()- Call the logger from any file
logger.LogInfo("hello from log")