GetPackageLoggerConcrete returns a concrete Logger instance for packages that need the specific type This ensures all packages log to the same unified log file while maintaining type compatibility.
(packageName string)
| 314 | // GetPackageLoggerConcrete returns a concrete Logger instance for packages that need the specific type |
| 315 | // This ensures all packages log to the same unified log file while maintaining type compatibility. |
| 316 | func GetPackageLoggerConcrete(packageName string) *Logger { |
| 317 | // Attempt to return the global logger as a concrete type when possible. |
| 318 | if lg, ok := GetGlobalLogger().(*Logger); ok { |
| 319 | return lg |
| 320 | } |
| 321 | |
| 322 | // Fallback: create a simple logger to avoid nil. |
| 323 | return NewSimpleLogger(LevelInfo) |
| 324 | } |
no test coverage detected