diff --git a/turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLogging.java b/turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLoggingManager.java similarity index 89% rename from turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLogging.java rename to turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLoggingManager.java index 58fd8cc486..b888dc5382 100644 --- a/turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLogging.java +++ b/turms-gateway/src/main/java/im/turms/gateway/infra/logging/NotificationLoggingManager.java @@ -18,9 +18,11 @@ package im.turms.gateway.infra.logging; import io.netty.buffer.ByteBuf; +import org.springframework.stereotype.Component; import im.turms.gateway.infra.proto.SimpleTurmsNotification; import im.turms.server.common.infra.lang.NumberFormatter; +import im.turms.server.common.infra.logging.BaseNotificationLoggingManager; import im.turms.server.common.infra.netty.ByteBufUtil; import static im.turms.server.common.infra.logging.CommonLogger.LOG_FIELD_DELIMITER; @@ -29,12 +31,10 @@ /** * @author James Chen */ -public final class NotificationLogging { +@Component +public class NotificationLoggingManager extends BaseNotificationLoggingManager { - private NotificationLogging() { - } - - public static void log( + public void log( SimpleTurmsNotification notification, int notificationBytes, int recipientCount,