github.com/stellar/stellar-etl@v1.0.1-0.20240312145900-4874b6bf2b89/internal/utils/logger.go (about) 1 package utils 2 3 import "github.com/stellar/go/support/log" 4 5 type EtlLogger struct { 6 *log.Entry 7 StrictExport bool 8 } 9 10 func NewEtlLogger() *EtlLogger { 11 return &EtlLogger{ 12 log.New(), 13 false, 14 } 15 } 16 17 func (l *EtlLogger) LogError(err error) { 18 if l.StrictExport { 19 l.Fatal(err) 20 } else { 21 l.Error(err) 22 } 23 }