feat: add Fatalf logging method to Logger interface and ServiceLogger

- Introduced Fatalf method in Logger interface for logging fatal messages with formatted content.
- Implemented Fatalf in ServiceLogger to log fatal messages and exit the program, enhancing error handling capabilities.
This commit is contained in:
Marvin Zhang
2024-12-23 13:15:18 +08:00
parent afe21b7ca0
commit bdc347aef7
2 changed files with 8 additions and 0 deletions

View File

@@ -13,4 +13,7 @@ type Logger interface {
// Errorf logs a formatted error message.
Errorf(format string, args ...interface{})
// Fatalf logs a formatted fatal message.
Fatalf(format string, args ...interface{})
}