Spaces:
Runtime error
Runtime error
Commit ·
1890cda
1
Parent(s): 847a1fa
Deploy files from GitHub repository
Browse files2 unmodified lines34567678910131112131714192021152 unmodified linesimport (
"fmt"
"log"
"os"
"godp.abdanhafidz.com/config"
)
func LogError(errorLogged error) {
fmt.Println("There is an error!")
file, err := os.OpenFile(config.LOG_PATH+"/error_log.txt", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
if err != nil {
log.Fatal(err)
}
fmt.Println("Error Log :", errorLogged)
log.SetOutput(file)
log.Println("Error Log :", errorLogged)
}utils/Logger.go-7