aboutsummaryrefslogtreecommitdiff
path: root/utils/logger/logger.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-06 17:45:55 +0530
committerBobby <[email protected]>2026-02-06 17:45:55 +0530
commit2da45b9fbf74d365951e37a4152f30e76caaeb98 (patch)
tree8fc9b5f02d37194c136e7f757f1e37c21825094c /utils/logger/logger.go
parent8cb229a3bc07387067ca76a34c05b44ff7a3039a (diff)
downloadmetachan-2da45b9fbf74d365951e37a4152f30e76caaeb98.tar.xz
metachan-2da45b9fbf74d365951e37a4152f30e76caaeb98.zip
Refactor task management and producer synchronization
- Updated TaskManager to utilize repositories for database operations, improving separation of concerns. - Enhanced logging functionality by replacing logger.Log with logger.Infof, logger.Warnf, and logger.Errorf for better readability and consistency. - Simplified ProducerSync function by removing unnecessary pagination logic and directly fetching producer data. - Introduced helper functions for calculating progress and managing task statuses. - Added new service for fetching and saving anime data, integrating multiple data sources (Jikan, Anilist, MALsync, TMDB, TVDB, Aniskip). - Created new types for task management and improved overall code organization. - Removed deprecated database calls and replaced them with repository methods for better maintainability.
Diffstat (limited to 'utils/logger/logger.go')
-rw-r--r--utils/logger/logger.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/logger/logger.go b/utils/logger/logger.go
index 41e7f1e..f1c94e7 100644
--- a/utils/logger/logger.go
+++ b/utils/logger/logger.go
@@ -131,7 +131,7 @@ func log(levelLabel LogLevel, zapLevel zapcore.Level, prefix string, msg any) {
message := fmt.Sprint(msg)
colored := colorMessage(levelLabel, message)
+ fullMessage := formatPrefix(prefix) + colored
- loggerInstance.Check(zapLevel, colored).
- Write(zap.String("prefix", formatPrefix(prefix)))
+ loggerInstance.Log(zapLevel, fullMessage)
}