Add standard and structured logging methods to enhance logging capabilities

This commit is contained in:
2025-03-01 05:24:18 +01:00
parent 459422bc60
commit 1be345b07f

View File

@@ -33,6 +33,11 @@ func Init(level string, filePath string) error {
return nil
}
// Standard logging methods
func Debug(args ...interface{}) {
log.Debug(args...)
}
func Info(args ...interface{}) {
log.Info(args...)
}
@@ -41,14 +46,11 @@ func Error(args ...interface{}) {
log.Error(args...)
}
func Debug(args ...interface{}) {
log.Debug(args...)
}
func Warn(args ...interface{}) {
log.Warn(args...)
}
// Structured logging methods
func WithField(key string, value interface{}) *logrus.Entry {
return log.WithField(key, value)
}
@@ -56,3 +58,7 @@ func WithField(key string, value interface{}) *logrus.Entry {
func WithFields(fields logrus.Fields) *logrus.Entry {
return log.WithFields(fields)
}
func WithError(err error) *logrus.Entry {
return log.WithError(err)
}