beancount-gs/script/log.go

23 lines
490 B
Go
Raw Permalink Normal View History

2021-11-17 09:59:06 +00:00
package script
import (
"fmt"
"time"
)
2021-11-21 14:37:13 +00:00
func LogInfo(ledgerName string, message string) {
fmt.Printf("[Info] [%s] [%s]: %s\n", time.Now().Format("2006-01-02 15:04:05"), ledgerName, message)
2021-11-17 09:59:06 +00:00
}
2021-11-21 14:37:13 +00:00
func LogSystemInfo(message string) {
LogInfo("System", message)
}
func LogError(ledgerName string, message string) {
fmt.Printf("[Error] [%s] [%s]: %s\n", time.Now().Format("2006-01-02 15:04:05"), ledgerName, message)
}
func LogSystemError(message string) {
LogError("System", message)
2021-11-17 09:59:06 +00:00
}