From 9f9dc0ce468a8880e1065b200afa534f1974902c Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 12 Jan 2024 13:03:57 +0300 Subject: [PATCH] Fix build --- .../log4j/appender/ReportPortalLog4j2Appender.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/log4j/appender/ReportPortalLog4j2Appender.java b/src/main/java/com/epam/ta/reportportal/log4j/appender/ReportPortalLog4j2Appender.java index 969a2c7..9cdbf67 100644 --- a/src/main/java/com/epam/ta/reportportal/log4j/appender/ReportPortalLog4j2Appender.java +++ b/src/main/java/com/epam/ta/reportportal/log4j/appender/ReportPortalLog4j2Appender.java @@ -17,6 +17,7 @@ import com.epam.reportportal.message.ReportPortalMessage; import com.epam.reportportal.message.TypeAwareByteSource; +import com.epam.reportportal.utils.files.Utils; import com.epam.ta.reportportal.ws.model.log.SaveLogRQ; import org.apache.logging.log4j.core.Filter; import org.apache.logging.log4j.core.Layout; @@ -38,8 +39,6 @@ import java.util.UUID; import static com.epam.reportportal.service.ReportPortal.emitLog; -import static com.epam.reportportal.utils.MimeTypeDetector.detect; -import static com.google.common.io.Files.asByteSource; /** * Log4j2 appender for report portal @@ -105,7 +104,7 @@ public void append(final LogEvent logEvent) { message = rpMessage.getMessage(); } else if (objectMessage instanceof File) { final File file = (File) objectMessage; - byteSource = new TypeAwareByteSource(asByteSource(file), detect(file)); + byteSource = Utils.getFile(file); message = "File reported"; } else {